Class AbstractDigest

java.lang.Object
com.sshtools.common.ssh.components.jce.AbstractDigest
All Implemented Interfaces:
Component, Digest
Direct Known Subclasses:
MD5Digest, SHA1Digest, SHA256Digest, SHA384Digest, SHA512Digest

public class AbstractDigest extends Object implements Digest
An abstract class that implements the Digest interface to provide support for JCE based digests.
Author:
Lee David Painter
  • Constructor Details

  • Method Details

    • doFinal

      public byte[] doFinal()
      Description copied from interface: Digest
      Do the final processing and return the hash.
      Specified by:
      doFinal in interface Digest
      Returns:
      the hash
    • putBigInteger

      public void putBigInteger(BigInteger bi)
      Description copied from interface: Digest
      Update the digest with a BigInteger value. This puts both the integer length of the BigInteger data and the binary data.
      Specified by:
      putBigInteger in interface Digest
    • putByte

      public void putByte(byte b)
      Description copied from interface: Digest
      Put a single byte into the digest.
      Specified by:
      putByte in interface Digest
    • putBytes

      public void putBytes(byte[] data)
      Description copied from interface: Digest
      Put a byte array into the digest.
      Specified by:
      putBytes in interface Digest
    • putBytes

      public void putBytes(byte[] data, int offset, int len)
      Description copied from interface: Digest
      Put a byte array into the digest
      Specified by:
      putBytes in interface Digest
    • putInt

      public void putInt(int i)
      Description copied from interface: Digest
      Put an integer into the digest.
      Specified by:
      putInt in interface Digest
    • putString

      public void putString(String str)
      Description copied from interface: Digest
      Put a String into the digest.
      Specified by:
      putString in interface Digest
    • reset

      public void reset()
      Description copied from interface: Digest
      Reset the underlying digest.
      Specified by:
      reset in interface Digest
    • getProvider

      public String getProvider()