Class MD2Digest
- Namespace
- Org.BouncyCastle.Crypto.Digests
- Assembly
- BouncyCastle.Cryptography.dll
public class MD2Digest : IDigest, IMemoable
- Inheritance
-
MD2Digest
- Implements
- Inherited Members
Constructors
MD2Digest()
public MD2Digest()
MD2Digest(MD2Digest)
public MD2Digest(MD2Digest t)
Parameters
Properties
AlgorithmName
public string AlgorithmName { get; }
Property Value
Methods
BlockUpdate(byte[], int, int)
public void BlockUpdate(byte[] input, int inOff, int length)
Parameters
BlockUpdate(ReadOnlySpan<byte>)
Update the message digest with a span of bytes.
public void BlockUpdate(ReadOnlySpan<byte> input)
Parameters
inputReadOnlySpan<byte>The span containing the data.
Copy()
Produce a copy of this object with its configuration and in its current state.
public IMemoable Copy()
Returns
Remarks
The returned object may be used simply to store the state, or may be used as a similar object starting from the copied state.
DoFinal(byte[], int)
public int DoFinal(byte[] output, int outOff)
Parameters
Returns
DoFinal(Span<byte>)
Close the digest, producing the final digest value.
public int DoFinal(Span<byte> output)
Parameters
Returns
- int
The number of bytes written.
Remarks
This call leaves the digest reset.
GetByteLength()
Return the size, in bytes, of the internal buffer used by this digest.
public int GetByteLength()
Returns
- int
The size, in bytes, of the internal buffer used by this digest.
GetDigestSize()
Return the size, in bytes, of the digest produced by this message digest.
public int GetDigestSize()
Returns
- int
The size, in bytes, of the digest produced by this message digest.
Reset()
public void Reset()
Reset(IMemoable)
Restore a copied object state into this object.
public void Reset(IMemoable other)
Parameters
otherIMemoablean object originally {@link #copy() copied} from an object of the same type as this instance.
Remarks
Implementations of this method should try to avoid or minimise memory allocation to perform the reset.
Exceptions
- InvalidCastException
if the provided object is not of the correct type.
- MemoableResetException
if the other parameter is in some other way invalid.
Update(byte)
public void Update(byte input)
Parameters
inputbyte