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.DigestCalculator
public OutputStream getOutputStream()
getOutputStream
in interface org.bouncycastle.operator.DigestCalculator
public byte[] getDigest()
getDigest
in interface org.bouncycastle.operator.DigestCalculator
Copyright © 2008–2017 The Netty Project. All rights reserved.