Class Index | File Index

Classes


Class KJUR.asn1.cms.SignerInfo


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
SignerInfo ::= SEQUENCE {
   version CMSVersion,
   sid SignerIdentifier,
   digestAlgorithm DigestAlgorithmIdentifier,
   signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
   signatureAlgorithm SignatureAlgorithmIdentifier,
   signature SignatureValue,
   unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
Field Summary
Field Attributes Field Name and Description
<static>  
KJUR.asn1.cms.SignerInfo.setForContentAndHash
set ContentType/MessageDigest/DigestAlgorithms for SignerInfo/SignedData This method will specify following fields by a parameters:
  • add ContentType signed attribute by encapContentInfo
  • add MessageDigest signed attribute by encapContentInfo and hashAlg
  • add a hash algorithm used in MessageDigest to digestAlgorithms field of SignedData
  • set a hash algorithm used in MessageDigest to digestAlgorithm field of SignerInfo
Argument 'params' is an associative array having following elements: some of elements can be omited.
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.SignerInfo(params)
class for SignerInfo ASN.1 structure of CMS SignedData
SignerInfo ::= SEQUENCE {
   version CMSVersion,
   sid SignerIdentifier,
   digestAlgorithm DigestAlgorithmIdentifier,
   signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
   signatureAlgorithm SignatureAlgorithmIdentifier,
   signature SignatureValue,
   unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
o = new KJUR.asn1.cms.SignerInfo();
o.setSignerIdentifier(certPEMstring);
o.dSignedAttrs.add(new KJUR.asn1.cms.ContentType({name: 'data'}));
o.dSignedAttrs.add(new KJUR.asn1.cms.MessageDigest({hex: 'a1b2...'}));
o.dSignedAttrs.add(new KJUR.asn1.cms.SigningTime());
o.sign(privteKeyParam, "SHA1withRSA");
Parameters:
{Array} params
associative array of parameters
Since:
jsrsasign 4.2.4 asn1cms 1.0.0
Field Detail
<static> KJUR.asn1.cms.SignerInfo.setForContentAndHash
set ContentType/MessageDigest/DigestAlgorithms for SignerInfo/SignedData This method will specify following fields by a parameters: Argument 'params' is an associative array having following elements: some of elements can be omited.
sd = new KJUR.asn1.cms.SignedData();
signerInfo.setForContentAndHash({sdObj: sd,
                                 eciObj: sd.dEncapContentInfo,
                                 hashAlg: 'sha256'});

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