HashCryptographer

Ecng.Security.Cryptographers

Represents basic cryptography services for a HashAlgorithm.

Erbt von: Disposable

Konstruktoren

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.

Methoden

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.

Rückgabe: 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.