Beispiel #1
0
        public byte[] ComputeHash(byte[] source, byte[] key)
        {
            HMACSHA1 hma = new HMACSHA1(key);

            return(hma.ComputeHash(source));
        }
Beispiel #2
0
        public byte[] ComputeHash(string source, string key, Encoding encoding)
        {
            HMACSHA1 hma = new HMACSHA1(encoding.GetBytes(key));

            return(hma.ComputeHash(encoding.GetBytes(source)));
        }