iText 8.0.5 API
iText.Commons.Digest.IMessageDigest Interface Reference

This interface should be implemented to provide applications the functionality of a message digest algorithm. More...

Inheritance diagram for iText.Commons.Digest.IMessageDigest:
iText.Commons.Bouncycastle.Crypto.IDigest iText.Bouncycastle.Crypto.DigestBC iText.Bouncycastlefips.Crypto.DigestBCFips

Public Member Functions

byte[]  Digest (byte[] enc)
  Performs a final update on the digest using the specified array of bytes, then completes the digest computation. More...
 
byte[]  Digest ()
  Completes the hash computation by performing final operations such as padding. Leaves the digest reset. More...
 
int  GetDigestLength ()
  Gets byte length of wrapped digest algorithm. More...
 
void  Update (byte[] buf, int off, int len)
  Updates the digest using the specified array of bytes, starting at the specified offset. More...
 
void  Update (byte[] buf)
  Updates the digest using the specified array of bytes. More...
 
void  Reset ()
  Resets the digest for further use. More...
 
string  GetAlgorithmName ()
  Returns a string that identifies the algorithm, independent of implementation details. More...
 

Detailed Description

This interface should be implemented to provide applications the functionality of a message digest algorithm.

Member Function Documentation

◆ Digest() [1/2]

byte [] iText.Commons.Digest.IMessageDigest.Digest ( )

Completes the hash computation by performing final operations such as padding. Leaves the digest reset.

Returns
The array of bytes for the resulting hash value

Implemented in iText.Bouncycastlefips.Crypto.DigestBCFips, iText.Bouncycastle.Crypto.DigestBC, and iText.Commons.Bouncycastle.Crypto.IDigest.

◆ Digest() [2/2]

byte [] iText.Commons.Digest.IMessageDigest.Digest ( byte[]  enc )

Performs a final update on the digest using the specified array of bytes, then completes the digest computation.

Parameters
enc the input to be updated before the digest is completed
Returns
The array of bytes for the resulting hash value

Implemented in iText.Bouncycastlefips.Crypto.DigestBCFips, iText.Bouncycastle.Crypto.DigestBC, and iText.Commons.Bouncycastle.Crypto.IDigest.

◆ GetAlgorithmName()

string iText.Commons.Digest.IMessageDigest.GetAlgorithmName ( )

Returns a string that identifies the algorithm, independent of implementation details.

Returns
The name of the algorithm.

Implemented in iText.Bouncycastlefips.Crypto.DigestBCFips, iText.Bouncycastle.Crypto.DigestBC, and iText.Commons.Bouncycastle.Crypto.IDigest.

◆ GetDigestLength()

int iText.Commons.Digest.IMessageDigest.GetDigestLength ( )

Gets byte length of wrapped digest algorithm.

Returns
The length of the digest in bytes.

Implemented in iText.Bouncycastlefips.Crypto.DigestBCFips, iText.Bouncycastle.Crypto.DigestBC, and iText.Commons.Bouncycastle.Crypto.IDigest.

◆ Reset()

void iText.Commons.Digest.IMessageDigest.Reset ( )

◆ Update() [1/2]

void iText.Commons.Digest.IMessageDigest.Update ( byte[]  buf )

Updates the digest using the specified array of bytes.

Parameters
buf byte array buffer

Implemented in iText.Bouncycastlefips.Crypto.DigestBCFips, iText.Bouncycastle.Crypto.DigestBC, and iText.Commons.Bouncycastle.Crypto.IDigest.

◆ Update() [2/2]

void iText.Commons.Digest.IMessageDigest.Update ( byte[]  buf,
int  off,
int  len 
)

Updates the digest using the specified array of bytes, starting at the specified offset.

Parameters
buf byte array buffer
off the offset to start from in the array of bytes
len the number of bytes to use, starting at offset

Implemented in iText.Bouncycastlefips.Crypto.DigestBCFips, iText.Bouncycastle.Crypto.DigestBC, and iText.Commons.Bouncycastle.Crypto.IDigest.