Name
Hash
Synopsis
This interface is used to calculate hashes. Objects that implement this interface are obtained from a JXTA crypto suite; the standard bindings supply hash objects capable of performing SHA-1 or MD5 hashes.
The hash
is calculated over all data passed to (repeated) calls to the
update( ) method. The final set of data over which
the hash will be calculated is passed to the doFinal( ) method, which returns the calculated hash.
public interface Hash extends jxta.security.util.Description { // Public Constants public static final byte ALG_MD5; // =2 public static final byte ALG_NULL; // =0 public static final byte ALG_SHA1; // =1 public static final String name; // ="Hash” // Public Instance Methods public abstract Object clone(); public abstract int doFinal(byte[ ] inBuf, int inOff, int inLen, byte[ ] outBuf, int outOff); public abstract byte getAlgorithm(); public abstract byte getDigestLength(); public abstract void reset(); public abstract void update(byte[ ] buf, int off, int len); }
Implementations
jxta.security.impl.hash.MD5Hash,
jxta.security.impl.hash.NullHash,
jxta.security.impl.hash.SHA1Hash
Passed To
jxta.security.impl.mac.MACAlgorithm.MACAlgorithm(),
jxta.security.impl.signature.RSASignature.RSASignature()
Returned By
jxta.security.crypto.JxtaCrypto.getJxtaHash(),
jxta.security.impl.crypto.JxtaCryptoSuite.getJxtaHash()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access