Class JcaTlsHash

java.lang.Object
org.bouncycastle.tls.crypto.impl.jcajce.JcaTlsHash
All Implemented Interfaces:
TlsHash

public class JcaTlsHash extends Object implements TlsHash
Wrapper class for providing support methods for a TlsHash based on the JCA MessageDigest class.
  • Constructor Details

  • Method Details

    • update

      public void update(byte[] data, int offSet, int length)
      Description copied from interface: TlsHash
      Update the hash with the passed in input.
      Specified by:
      update in interface TlsHash
      Parameters:
      data - input array containing the data.
      offSet - offset into the input array the input starts at.
      length - the length of the input data.
    • calculateHash

      public byte[] calculateHash()
      Description copied from interface: TlsHash
      Return calculated hash for any input passed in.
      Specified by:
      calculateHash in interface TlsHash
      Returns:
      the hash value.
    • cloneHash

      public TlsHash cloneHash()
      Description copied from interface: TlsHash
      Return a clone of this hash object representing its current state.
      Specified by:
      cloneHash in interface TlsHash
      Returns:
      a clone of the current hash.
    • reset

      public void reset()
      Description copied from interface: TlsHash
      Reset the hash underlying this service.
      Specified by:
      reset in interface TlsHash