HashCryptographer
Ecng.Security.Cryptographers
Represents basic cryptography services for a HashAlgorithm.
Наследует: Disposable
Конструкторы
HashCryptographer
public HashCryptographer(HashAlgorithm algorithm, byte[] key)
hashCryptographer = HashCryptographer(algorithm, key)
Initialize a new instance of the HashCryptographer with an algorithm type and key.
- algorithm
- A fully qualifed type name derived from HashAlgorithm.
- key
- The key for a KeyedHashAlgorithm.
Методы
ComputeHash
public byte[] ComputeHash(byte[] plaintext)
result = hashCryptographer.ComputeHash(plaintext)
Computes the hash value of the plaintext.
- plaintext
- The plaintext in which you wish to hash.
Возвращает: The resulting hash.
DisposeManaged
protected override void DisposeManaged()
hashCryptographer.DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.