public class BaseDigest extends Object implements Digest
| Constructor and Description |
|---|
BaseDigest(String algorithm,
int bsize)
Create a new digest using the given algorithm and block size.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Digest that) |
byte[] |
digest() |
boolean |
equals(Object obj) |
String |
getAlgorithm() |
int |
getBlockSize() |
protected MessageDigest |
getMessageDigest() |
int |
hashCode() |
void |
init() |
String |
toString() |
void |
update(byte[] data) |
void |
update(byte[] data,
int start,
int len) |
public BaseDigest(String algorithm, int bsize)
MessageDigest object will be done in the init() method.algorithm - the JCE algorithm to use for this digestbsize - the block size of this digestpublic final String getAlgorithm()
getAlgorithm in interface AlgorithmNameProviderpublic int getBlockSize()
getBlockSize in interface DigestInformationpublic void update(byte[] data)
throws Exception
public void update(byte[] data,
int start,
int len)
throws Exception
protected MessageDigest getMessageDigest()
MessageDigest - may be null if init() not calledpublic byte[] digest()
throws Exception
public int compareTo(Digest that)
compareTo in interface Comparable<Digest>Copyright © 2018–2021 The Apache Software Foundation. All rights reserved.