public class DigestSpec extends java.lang.Object implements Spec<org.bouncycastle.crypto.Digest>
newInstance() method.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
algorithm
Digest algorithm name.
|
private int |
size
Requested size of variable-size hash algorithms, e.g.
|
| Constructor and Description |
|---|
DigestSpec(java.lang.String algName)
Creates a new instance from the given algorithm name.
|
DigestSpec(java.lang.String algName,
int digestSize)
Constructor for digests that have variable output size, e.g.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlgorithm() |
int |
getSize() |
org.bouncycastle.crypto.Digest |
newInstance()
Creates a new digest instance.
|
java.lang.String |
toString() |
private final java.lang.String algorithm
private final int size
public DigestSpec(java.lang.String algName)
algName - Digest algorithm name.public DigestSpec(java.lang.String algName,
int digestSize)
algName - Digest algorithm name.digestSize - Size of resultant digest in bits.public java.lang.String getAlgorithm()
getAlgorithm in interface Spec<org.bouncycastle.crypto.Digest>public int getSize()
public org.bouncycastle.crypto.Digest newInstance()
newInstance in interface Spec<org.bouncycastle.crypto.Digest>public java.lang.String toString()
toString in class java.lang.Object