MegaApi.Crypto.stringhash C# (CSharp) Метод

stringhash() публичный статический Метод

public static stringhash ( string s, Sjcl aes ) : string
s string
aes Sjcl
Результат string
        public static string stringhash(string s, Sjcl.Cipher.Aes aes)
        {
            var s32 = str_to_a32(s);
            var h32 = new uint[] { 0, 0, 0, 0 };

            for (int i = 0; i < s32.Length; i++) { h32[i & 3] ^= s32[i]; }

            for (int i = 16384; (i--) != 0; ) { h32 = aes.Encrypt(h32); }

            return a32_to_base64(new uint[] { h32[0], h32[2] });
        }