Пример #1
0
    static AESTools()
    {
        string code_key = MD5Tool.GetMd5Hash("soulgame");
        string code_iv  = MD5Tool.GetMd5Hash("bear");

        //Rfc2898DeriveBytes rfc = new Rfc2898DeriveBytes("soulgame", Encoding.UTF8.GetBytes("garfield"));
        //Key = rfc.GetBytes (32);
        //IV = rfc.GetBytes (16);
        Key = Encoding.UTF8.GetBytes(code_key.Substring(0, 16));
        IV  = Encoding.UTF8.GetBytes(code_iv.Substring(0, 16));
        //Debug.Log (Key.Length);
        //Debug.Log (IV.Length);
    }