THashAlgorithm

An abstract base class for algorithms that calculate a hash value for arbitrary streams of bytes.

Inheritance

LevelAncestorDescription
1TObjectUltimate ancestor in a class hierarchy
2TOutputStreamA stream of bytes that can be written from front to end.
3THashAlgorithm

Source

Hash.Algorithm.pas (32)

Description

THashAlgorithm extends TOutputStream which allows users to efficiently write arbitrary data to the hash algorithm. Once all data has been written, Digest can be called to flush internal buffers and produce the resulting hash value.

Fields

ScopeVisibilityTypeNameDescription
InstanceprivateTMemoryBlockBuffer
InstanceprivateTOutputStreamBufferStream
InstanceprivateTPositiveInteger64Size
InstanceprivateTPositiveInteger32Index

Methods

ScopeVisibilityResultNameDescription
InstanceprotectedCompress(Stream: TInputStream)
InstanceprotectedWriteHash(Stream: TOutputStream)
InstanceprotectedWriteSize(Stream: TOutputStream; Size: TPositiveInteger64)
InstanceprotectedInitialize()
InstanceprotectedFinalize()
InstanceprotectedAssignFrom(Source: THashAlgorithm)
InstanceprotectedCompressBuffer()
TypeprotectedTPositiveInteger32GetByteCountForSize()
InstancepublicCreate()
InstancepublicDestroy()
InstancepublicWrite(Buffer; Count: TPositiveInteger32)
InstancepublicTHashAlgorithmCopy()Copies the entire current internal state of the algorithm so it can be used independently of this instance.
InstancepublicTMemoryBlockDigest()Produces the hash for the data that has been written to the algorithm and reinitializes the internal state of the algorithm so it can be used again.
TypepublicTInteger32GetHashSize()Returns the size in bytes of the hash that is produced by the algorithm.
TypepublicTInteger32GetBlockSize()Returns the size in bytes of the blocks that the algorithm operates on internally.
TypepublicTMemoryBlockCompute(Input: TByteBlock)