public class SignerInfo
extends org.bouncycastle.asn1.ASN1Object
SignerIdentifier
.
PKCS#7: SignerInfo ::= SEQUENCE { version Version, sid SignerIdentifier, digestAlgorithm DigestAlgorithmIdentifier, authenticatedAttributes [0] IMPLICIT Attributes OPTIONAL, digestEncryptionAlgorithm DigestEncryptionAlgorithmIdentifier, encryptedDigest EncryptedDigest, unauthenticatedAttributes [1] IMPLICIT Attributes OPTIONAL } EncryptedDigest ::= OCTET STRING DigestAlgorithmIdentifier ::= AlgorithmIdentifier DigestEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier ----------------------------------------- RFC 5652: SignerInfo ::= SEQUENCE { version CMSVersion, sid SignerIdentifier, digestAlgorithm DigestAlgorithmIdentifier, signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL, signatureAlgorithm SignatureAlgorithmIdentifier, signature SignatureValue, unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL } --SignerIdentifier
referenced certificates are at containing --SignedData
certificates element. SignerIdentifier ::= CHOICE { issuerAndSerialNumberIssuerAndSerialNumber
, subjectKeyIdentifier [0] SubjectKeyIdentifier } -- SeeAttributes
for generalized SET OFAttribute
SignedAttributes ::= SET SIZE (1..MAX) OF Attribute UnsignedAttributes ::= SET SIZE (1..MAX) OF AttributeAttribute
::= SEQUENCE { attrType OBJECT IDENTIFIER, attrValues SET OF AttributeValue } AttributeValue ::= ANY SignatureValue ::= OCTET STRING
Constructor and Description |
---|
SignerInfo(SignerIdentifier sid,
org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm,
org.bouncycastle.asn1.ASN1Set authenticatedAttributes,
org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm,
org.bouncycastle.asn1.ASN1OctetString encryptedDigest,
org.bouncycastle.asn1.ASN1Set unauthenticatedAttributes) |
SignerInfo(SignerIdentifier sid,
org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm,
Attributes authenticatedAttributes,
org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm,
org.bouncycastle.asn1.ASN1OctetString encryptedDigest,
Attributes unauthenticatedAttributes) |
Modifier and Type | Method and Description |
---|---|
org.bouncycastle.asn1.ASN1Set |
getAuthenticatedAttributes() |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getDigestAlgorithm() |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getDigestEncryptionAlgorithm() |
org.bouncycastle.asn1.ASN1OctetString |
getEncryptedDigest() |
static SignerInfo |
getInstance(java.lang.Object o)
Return a SignerInfo object from the given input
|
SignerIdentifier |
getSID() |
org.bouncycastle.asn1.ASN1Set |
getUnauthenticatedAttributes() |
org.bouncycastle.asn1.ASN1Integer |
getVersion() |
org.bouncycastle.asn1.ASN1Primitive |
toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.
|
public SignerInfo(SignerIdentifier sid, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm, org.bouncycastle.asn1.ASN1Set authenticatedAttributes, org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm, org.bouncycastle.asn1.ASN1OctetString encryptedDigest, org.bouncycastle.asn1.ASN1Set unauthenticatedAttributes)
sid
- digAlgorithm
- CMS knows as 'digestAlgorithm'authenticatedAttributes
- CMS knows as 'signedAttrs'digEncryptionAlgorithm
- CMS knows as 'signatureAlgorithm'encryptedDigest
- CMS knows as 'signature'unauthenticatedAttributes
- CMS knows as 'unsignedAttrs'public SignerInfo(SignerIdentifier sid, org.bouncycastle.asn1.x509.AlgorithmIdentifier digAlgorithm, Attributes authenticatedAttributes, org.bouncycastle.asn1.x509.AlgorithmIdentifier digEncryptionAlgorithm, org.bouncycastle.asn1.ASN1OctetString encryptedDigest, Attributes unauthenticatedAttributes)
sid
- digAlgorithm
- CMS knows as 'digestAlgorithm'authenticatedAttributes
- CMS knows as 'signedAttrs'digEncryptionAlgorithm
- CMS knows as 'signatureAlgorithm'encryptedDigest
- CMS knows as 'signature'unauthenticatedAttributes
- CMS knows as 'unsignedAttrs'public static SignerInfo getInstance(java.lang.Object o) throws java.lang.IllegalArgumentException
Accepted inputs:
SignerInfo
object
ASN1Sequence
input formats with SignerInfo structure inside
o
- the object we want converted.java.lang.IllegalArgumentException
- if the object cannot be converted.public org.bouncycastle.asn1.ASN1Integer getVersion()
public SignerIdentifier getSID()
public org.bouncycastle.asn1.ASN1Set getAuthenticatedAttributes()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithm()
public org.bouncycastle.asn1.ASN1OctetString getEncryptedDigest()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestEncryptionAlgorithm()
public org.bouncycastle.asn1.ASN1Set getUnauthenticatedAttributes()
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
toASN1Primitive
in interface org.bouncycastle.asn1.ASN1Encodable
toASN1Primitive
in class org.bouncycastle.asn1.ASN1Object