public final class Digester extends Object implements org.bouncycastle.operator.DigestCalculator
OCSPReqBuilder needs a DigestCalculator but BC doesn't
provide any public implementations of that interface. That's why we need to
write our own. There's a default SHA-1 implementation and one for SHA-256.
Which one to use will depend on the Certificate Authority (CA).| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getAlgorithmIdentifier() |
byte[] |
getDigest() |
OutputStream |
getOutputStream() |
static org.bouncycastle.operator.DigestCalculator |
sha1() |
static org.bouncycastle.operator.DigestCalculator |
sha256() |
public static org.bouncycastle.operator.DigestCalculator sha1()
public static org.bouncycastle.operator.DigestCalculator sha256()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
getAlgorithmIdentifier in interface org.bouncycastle.operator.DigestCalculatorpublic OutputStream getOutputStream()
getOutputStream in interface org.bouncycastle.operator.DigestCalculatorpublic byte[] getDigest()
getDigest in interface org.bouncycastle.operator.DigestCalculatorCopyright © 2008–2018 The Netty Project. All rights reserved.