System::Security::Cryptography::HashAlgorithm class

HashAlgorithm class

Base class for hashing algorithms. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class HashAlgorithm : public System::Security::Cryptography::ICryptoTransform

Methods

MethodDescription
ComputeHash(const ArrayPtr<uint8_t>&)Hashes buffer.
ComputeHash(const ArrayPtr<uint8_t>&, int, int)Hashes buffer slice.
ComputeHash(SharedPtr<IO::Stream> const&)Reads stream until end and calculates hash for the data read.
static Create(const String&)Creates hash algorithm based on name.
virtual get_Hash()Gets value of calculated hash code.
virtual get_HashSize()Gets size of calculated hash value in bytes.
get_InputBlockSize() overrideInput block size.
get_OutputBlockSize() overrideOutput block size.
virtual Initialize()Resets hasher into initial state.
TransformBlock(ArrayPtr<uint8_t>, int, int, ArrayPtr<uint8_t>, int) overrideProcesses block of data and copies data to output array.
TransformFinalBlock(ArrayPtr<uint8_t>, int, int) overrideProcesses last block of data and calculates hash.
virtual ~HashAlgorithm()Destructor.

See Also