SharpCifs.Util.Hmact64.Hmact64 C# (CSharp) Method

Hmact64() public method

Creates an HMACT64 instance which uses the given secret key material.
Creates an HMACT64 instance which uses the given secret key material.
public Hmact64 ( byte key ) : System
key byte The key material to use in hashing.
return System
		public Hmact64(byte[] key) 
		{
			int length = Math.Min(key.Length, BlockLength);
			for (int i = 0; i < length; i++)
			{
				_ipad[i] = unchecked((byte)(key[i] ^ Ipad));
				_opad[i] = unchecked((byte)(key[i] ^ Opad));
			}
			for (int i1 = length; i1 < BlockLength; i1++)
			{
				_ipad[i1] = Ipad;
				_opad[i1] = Opad;
			}
			try
			{
				_md5 = GetInstance("MD5");
			}
			catch (Exception ex)
			{
				throw new InvalidOperationException(ex.Message);
			}
			EngineReset();
		}