Class CertificateIDBC
- java.lang.Object
-
- com.itextpdf.bouncycastle.cert.ocsp.CertificateIDBC
-
- All Implemented Interfaces:
ICertificateID
public class CertificateIDBC extends java.lang.Object implements ICertificateID
Wrapper class forCertificateID
.
-
-
Field Summary
Fields Modifier and Type Field Description private org.bouncycastle.cert.ocsp.CertificateID
certificateID
private static AlgorithmIdentifierBC
HASH_SHA1
private static CertificateIDBC
INSTANCE
-
Constructor Summary
Constructors Constructor Description CertificateIDBC(IDigestCalculator digestCalculator, IX509CertificateHolder certificateHolder, java.math.BigInteger bigInteger)
Creates new wrapper instance forCertificateID
.CertificateIDBC(org.bouncycastle.cert.ocsp.CertificateID certificateID)
Creates new wrapper instance forCertificateID
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.org.bouncycastle.cert.ocsp.CertificateID
getCertificateID()
Gets actual org.bouncycastle object being wrapped.IASN1ObjectIdentifier
getHashAlgOID()
Calls actualgetHashAlgOID
method for the wrapped CertificateID object.IAlgorithmIdentifier
getHashSha1()
GetsgetHashSha1
constant for the wrapped CertificateID.static CertificateIDBC
getInstance()
Gets wrapper instance.java.math.BigInteger
getSerialNumber()
Calls actualgetSerialNumber
method for the wrapped CertificateID object.int
hashCode()
Returns a hash code value based on the wrapped object.boolean
matchesIssuer(IX509CertificateHolder certificateHolder, IDigestCalculatorProvider provider)
Calls actualmatchesIssuer
method for the wrapped CertificateID object.java.lang.String
toString()
DelegatestoString
method call to the wrapped object.
-
-
-
Field Detail
-
INSTANCE
private static final CertificateIDBC INSTANCE
-
HASH_SHA1
private static final AlgorithmIdentifierBC HASH_SHA1
-
certificateID
private final org.bouncycastle.cert.ocsp.CertificateID certificateID
-
-
Constructor Detail
-
CertificateIDBC
public CertificateIDBC(org.bouncycastle.cert.ocsp.CertificateID certificateID)
Creates new wrapper instance forCertificateID
.- Parameters:
certificateID
-CertificateID
to be wrapped
-
CertificateIDBC
public CertificateIDBC(IDigestCalculator digestCalculator, IX509CertificateHolder certificateHolder, java.math.BigInteger bigInteger) throws OCSPExceptionBC
Creates new wrapper instance forCertificateID
.- Parameters:
digestCalculator
- DigestCalculator wrapper to createCertificateID
certificateHolder
- X509CertificateHolder wrapper to createCertificateID
bigInteger
- BigInteger to createCertificateID
- Throws:
OCSPExceptionBC
- ifOCSPException
occurs duringCertificateID
instance creation.
-
-
Method Detail
-
getInstance
public static CertificateIDBC getInstance()
Gets wrapper instance.- Returns:
CertificateIDBC
instance.
-
getCertificateID
public org.bouncycastle.cert.ocsp.CertificateID getCertificateID()
Gets actual org.bouncycastle object being wrapped.- Returns:
- wrapped
CertificateID
.
-
getHashAlgOID
public IASN1ObjectIdentifier getHashAlgOID()
Calls actualgetHashAlgOID
method for the wrapped CertificateID object.- Specified by:
getHashAlgOID
in interfaceICertificateID
- Returns:
IASN1ObjectIdentifier
hash algorithm OID wrapper.
-
getHashSha1
public IAlgorithmIdentifier getHashSha1()
GetsgetHashSha1
constant for the wrapped CertificateID.- Specified by:
getHashSha1
in interfaceICertificateID
- Returns:
- CertificateID.HASH_SHA1 wrapper.
-
matchesIssuer
public boolean matchesIssuer(IX509CertificateHolder certificateHolder, IDigestCalculatorProvider provider) throws OCSPExceptionBC
Calls actualmatchesIssuer
method for the wrapped CertificateID object.- Specified by:
matchesIssuer
in interfaceICertificateID
- Parameters:
certificateHolder
- X509CertificateHolder wrapperprovider
- DigestCalculatorProvider wrapper- Returns:
- boolean value.
- Throws:
OCSPExceptionBC
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
Calls actualgetSerialNumber
method for the wrapped CertificateID object.- Specified by:
getSerialNumber
in interfaceICertificateID
- Returns:
- serial number value.
-
equals
public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. Compares wrapped objects.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Returns a hash code value based on the wrapped object.- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
DelegatestoString
method call to the wrapped object.- Overrides:
toString
in classjava.lang.Object
-
-