Class Index | File Index

Classes


Class KJUR.asn1.cms.SignedData


Extends KJUR.asn1.ASN1Object.
class for Attributes ASN.1 structure of CMS SigndData
Defined in: asn1cms-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
class for SignerInfo ASN.1 structure of CMS SignedData
SignedData ::= SEQUENCE {
   version CMSVersion,
   digestAlgorithms DigestAlgorithmIdentifiers,
   encapContentInfo EncapsulatedContentInfo,
   certificates [0] IMPLICIT CertificateSet OPTIONAL,
   crls [1] IMPLICIT RevocationInfoChoices OPTIONAL,
   signerInfos SignerInfos }
SignerInfos ::= SET OF SignerInfo
CertificateSet ::= SET OF CertificateChoices
DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
CertificateSet ::= SET OF CertificateChoices
RevocationInfoChoices ::= SET OF RevocationInfoChoice
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex
Class Detail
KJUR.asn1.cms.SignedData(params)
class for SignerInfo ASN.1 structure of CMS SignedData
SignedData ::= SEQUENCE {
   version CMSVersion,
   digestAlgorithms DigestAlgorithmIdentifiers,
   encapContentInfo EncapsulatedContentInfo,
   certificates [0] IMPLICIT CertificateSet OPTIONAL,
   crls [1] IMPLICIT RevocationInfoChoices OPTIONAL,
   signerInfos SignerInfos }
SignerInfos ::= SET OF SignerInfo
CertificateSet ::= SET OF CertificateChoices
DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
CertificateSet ::= SET OF CertificateChoices
RevocationInfoChoices ::= SET OF RevocationInfoChoice
sd = new KJUR.asn1.cms.SignedData();
sd.dEncapContentInfo.setContentValueStr("test string");
sd.signerInfoList[0].setForContentAndHash({sdObj: sd,
                                           eciObj: sd.dEncapContentInfo,
                                           hashAlg: 'sha256'});
sd.signerInfoList[0].dSignedAttrs.add(new KJUR.asn1.cms.SigningTime());
sd.signerInfoList[0].setSignerIdentifier(certPEM);
sd.signerInfoList[0].sign(prvP8PEM, "SHA256withRSA");
hex = sd.getContentInfoEncodedHex();
Parameters:
{Array} params
associative array of parameters
Since:
jsrsasign 4.2.4 asn1cms 1.0.0

© 2012-2017 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0