Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HmacSha256"/>.
 /// <para/> Useful for using the same instance for computing HMAC each time with a different key
 /// by calling <see cref="ComputeHash(byte[], byte[])"/>
 /// </summary>
 public HmacSha256()
 {
     hashFunc = new Sha256();
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HmacSha256"/> using the given key.
 /// </summary>
 /// <exception cref="ArgumentNullException"/>
 /// <param name="key">Key to use, if the key is bigger than 64 bytes it will be hashed using <see cref="Sha256"/></param>
 public HmacSha256(byte[] key)
 {
     hashFunc = new Sha256();
     Key      = key;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Ripemd160Sha256"/>.
 /// </summary>
 public Ripemd160Sha256()
 {
     rip = new Ripemd160();
     sha = new Sha256();
 }