Class SignerInfo
-
- All Implemented Interfaces:
-
io.anyline.nfc.bouncycastle.asn1.ASN1Encodable,io.anyline.nfc.bouncycastle.util.Encodable
public class SignerInfo extends ASN1Object
RFC 5652: Signature container per Signer, see 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 { issuerAndSerialNumber IssuerAndSerialNumber, subjectKeyIdentifier [0] SubjectKeyIdentifier } -- See Attributes for generalized SET OF Attribute SignedAttributes ::= SET SIZE (1..MAX) OF Attribute UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute Attribute ::= SEQUENCE { attrType OBJECT IDENTIFIER, attrValues SET OF AttributeValue } AttributeValue ::= ANY SignatureValue ::= OCTET STRING
-
-
Field Summary
Fields Modifier and Type Field Description public ASN1Integerversionpublic SignerIdentifiersidpublic ASN1SetauthenticatedAttributespublic ASN1OctetStringencryptedDigestpublic ASN1SetunauthenticatedAttributes
-
Constructor Summary
Constructors Constructor Description SignerInfo(SignerIdentifier sid, AlgorithmIdentifier digAlgorithm, ASN1Set authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, ASN1OctetString encryptedDigest, ASN1Set unauthenticatedAttributes)SignerInfo(SignerIdentifier sid, AlgorithmIdentifier digAlgorithm, Attributes authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, ASN1OctetString encryptedDigest, Attributes unauthenticatedAttributes)
-
Method Summary
Modifier and Type Method Description ASN1IntegergetVersion()SignerIdentifiergetSID()ASN1SetgetAuthenticatedAttributes()ASN1OctetStringgetEncryptedDigest()ASN1SetgetUnauthenticatedAttributes()static SignerInfogetInstance(Object o)Return a SignerInfo object from the given input Accepted inputs: - null → null
- SignerInfo object
- ASN1Sequence input formats with SignerInfo structure inside
AlgorithmIdentifiergetDigestAlgorithm()AlgorithmIdentifiergetDigestEncryptionAlgorithm()ASN1PrimitivetoASN1Primitive()Produce an object suitable for an ASN1OutputStream. -
-
Constructor Detail
-
SignerInfo
SignerInfo(SignerIdentifier sid, AlgorithmIdentifier digAlgorithm, ASN1Set authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, ASN1OctetString encryptedDigest, ASN1Set unauthenticatedAttributes)
- Parameters:
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'
-
SignerInfo
SignerInfo(SignerIdentifier sid, AlgorithmIdentifier digAlgorithm, Attributes authenticatedAttributes, AlgorithmIdentifier digEncryptionAlgorithm, ASN1OctetString encryptedDigest, Attributes unauthenticatedAttributes)
- Parameters:
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'
-
-
Method Detail
-
getVersion
ASN1Integer getVersion()
-
getSID
SignerIdentifier getSID()
-
getAuthenticatedAttributes
ASN1Set getAuthenticatedAttributes()
-
getEncryptedDigest
ASN1OctetString getEncryptedDigest()
-
getUnauthenticatedAttributes
ASN1Set getUnauthenticatedAttributes()
-
getInstance
static SignerInfo getInstance(Object o)
Return a SignerInfo object from the given input
Accepted inputs:
- null → null
- SignerInfo object
- ASN1Sequence input formats with SignerInfo structure inside
- Parameters:
o- the object we want converted.
-
getDigestAlgorithm
AlgorithmIdentifier getDigestAlgorithm()
-
getDigestEncryptionAlgorithm
AlgorithmIdentifier getDigestEncryptionAlgorithm()
-
toASN1Primitive
ASN1Primitive toASN1Primitive()
Produce an object suitable for an ASN1OutputStream.
-
-
-