Class AbstractDigest
java.lang.Object
com.sshtools.common.ssh.components.jce.AbstractDigest
- Direct Known Subclasses:
MD5Digest,SHA1Digest,SHA256Digest,SHA384Digest,SHA512Digest
An abstract class that implements the
Digest
interface to provide support for JCE based digests.- Author:
- Lee David Painter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]doFinal()Do the final processing and return the hash.voidUpdate the digest with a BigInteger value.voidputByte(byte b) Put a single byte into the digest.voidputBytes(byte[] data) Put a byte array into the digest.voidputBytes(byte[] data, int offset, int len) Put a byte array into the digestvoidputInt(int i) Put an integer into the digest.voidPut a String into the digest.voidreset()Reset the underlying digest.
-
Constructor Details
-
AbstractDigest
- Throws:
NoSuchAlgorithmException
-
-
Method Details
-
doFinal
public byte[] doFinal()Description copied from interface:DigestDo the final processing and return the hash. -
putBigInteger
Description copied from interface:DigestUpdate the digest with a BigInteger value. This puts both the integer length of the BigInteger data and the binary data.- Specified by:
putBigIntegerin interfaceDigest
-
putByte
public void putByte(byte b) Description copied from interface:DigestPut a single byte into the digest. -
putBytes
public void putBytes(byte[] data) Description copied from interface:DigestPut a byte array into the digest. -
putBytes
public void putBytes(byte[] data, int offset, int len) Description copied from interface:DigestPut a byte array into the digest -
putInt
public void putInt(int i) Description copied from interface:DigestPut an integer into the digest. -
putString
Description copied from interface:DigestPut a String into the digest. -
reset
public void reset()Description copied from interface:DigestReset the underlying digest. -
getProvider
-