예제 #1
0
 public HMACSHA1(byte[] rgbKey)
 {
     this.hmac = new HMACAlgorithm("SHA1");
     this.HashSizeValue = 160;
     this.Key = rgbKey;
     this.m_disposed = false;
 }
예제 #2
0
 public void Initialize()
 {
     this.hash = (byte[])null;
     this.block.Initialize();
     byte[] rgb = HMACAlgorithm.KeySetup(this.key, (byte)54);
     this.algo.Initialize();
     this.block.Core(rgb);
     Array.Clear((Array)rgb, 0, rgb.Length);
 }
예제 #3
0
 public byte[] Final()
 {
     this.block.Final();
     byte[] hash     = this.algo.Hash;
     byte[] numArray = HMACAlgorithm.KeySetup(this.key, (byte)92);
     this.algo.Initialize();
     this.algo.TransformBlock(numArray, 0, numArray.Length, numArray, 0);
     this.algo.TransformFinalBlock(hash, 0, hash.Length);
     this.hash = this.algo.Hash;
     Array.Clear((Array)numArray, 0, numArray.Length);
     Array.Clear((Array)hash, 0, hash.Length);
     return(this.hash);
 }