Exemple #1
0
        public static byte[] HMACSHA512(byte[] key, byte[] data)
        {
            var mac = new LushCoin.BouncyCastle.Crypto.Macs.HMac(new Sha512Digest());

            mac.Init(new KeyParameter(key));
            mac.Update(data);
            byte[] result = new byte[mac.GetMacSize()];
            mac.DoFinal(result, 0);
            return(result);
        }