Package org.bouncycastle.its.bc
Class BcITSContentSigner
java.lang.Object
org.bouncycastle.its.bc.BcITSContentSigner
- All Implemented Interfaces:
ITSContentSigner
-
Constructor Summary
ConstructorDescriptionBcITSContentSigner
(org.bouncycastle.crypto.params.ECPrivateKeyParameters privKey) Constructor for self-signing.BcITSContentSigner
(org.bouncycastle.crypto.params.ECPrivateKeyParameters privKey, ITSCertificate signerCert) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
org.bouncycastle.asn1.ASN1ObjectIdentifier
org.bouncycastle.asn1.x509.AlgorithmIdentifier
Returns a stream that will accept data for the purpose of calculating a signature.byte[]
Returns a signature based on the current data written to the stream, since the start or the last call to getSignature().boolean
Return true if this ContentSigner is for self signing.
-
Constructor Details
-
BcITSContentSigner
public BcITSContentSigner(org.bouncycastle.crypto.params.ECPrivateKeyParameters privKey) Constructor for self-signing.- Parameters:
privKey
-
-
BcITSContentSigner
public BcITSContentSigner(org.bouncycastle.crypto.params.ECPrivateKeyParameters privKey, ITSCertificate signerCert)
-
-
Method Details
-
getAssociatedCertificate
- Specified by:
getAssociatedCertificate
in interfaceITSContentSigner
-
getAssociatedCertificateDigest
public byte[] getAssociatedCertificateDigest()- Specified by:
getAssociatedCertificateDigest
in interfaceITSContentSigner
-
getDigestAlgorithm
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithm()- Specified by:
getDigestAlgorithm
in interfaceITSContentSigner
-
getOutputStream
Description copied from interface:ITSContentSigner
Returns a stream that will accept data for the purpose of calculating a signature. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.- Specified by:
getOutputStream
in interfaceITSContentSigner
- Returns:
- an OutputStream
-
isForSelfSigning
public boolean isForSelfSigning()Description copied from interface:ITSContentSigner
Return true if this ContentSigner is for self signing. False otherwise.- Specified by:
isForSelfSigning
in interfaceITSContentSigner
- Returns:
- true if for self-signing.
-
getCurveID
public org.bouncycastle.asn1.ASN1ObjectIdentifier getCurveID()- Specified by:
getCurveID
in interfaceITSContentSigner
-
getSignature
public byte[] getSignature()Description copied from interface:ITSContentSigner
Returns a signature based on the current data written to the stream, since the start or the last call to getSignature().- Specified by:
getSignature
in interfaceITSContentSigner
- Returns:
- bytes representing the signature.
-