Class Index | File Index

Classes


Class KJUR.asn1.x509.AttributeTypeAndValue


Extends KJUR.asn1.ASN1Object.
AttributeTypeAndValue ASN.1 structure class
Defined in: asn1x509-1.0.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
AttributeTypeAndValue ASN.1 structure class This class generates AttributeTypeAndValue defined in RFC 5280 4.1.2.4.
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified, params
Methods borrowed from class KJUR.asn1.ASN1Object:
getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.x509.AttributeTypeAndValue(params)
AttributeTypeAndValue ASN.1 structure class This class generates AttributeTypeAndValue defined in RFC 5280 4.1.2.4.
AttributeTypeAndValue ::= SEQUENCE {
  type     AttributeType,
  value    AttributeValue }
AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY -- DEFINED BY AttributeType
The constructor argument can have following parameters:
  • {String}type - AttributeType name or OID(ex. C,O,CN)
  • {String}value - raw string of ASN.1 value of AttributeValue
  • {String}ds - DirectoryString type of AttributeValue
  • {String}rule - DirectoryString type rule (ex. "prn" or "utf8") set DirectoryString type automatically when "ds" not specified.
  • {String}str - AttributeTypeAndVale string (ex. "C=US"). When type and value don't exists, this "str" will be converted to "type" and "value".

new KJUR.asn1.x509.AttributeTypeAndValue({type:'C',value:'US',ds:'prn'})
new KJUR.asn1.x509.AttributeTypeAndValue({type:'givenName',value:'John',ds:'prn'})
new KJUR.asn1.x509.AttributeTypeAndValue({type:'2.5.4.9',value:'71 Bowman St',ds:'prn'})
new KJUR.asn1.x509.AttributeTypeAndValue({str:'O=T1'})
new KJUR.asn1.x509.AttributeTypeAndValue({str:'streetAddress=71 Bowman St'})
new KJUR.asn1.x509.AttributeTypeAndValue({str:'O=T1',rule='prn'})
new KJUR.asn1.x509.AttributeTypeAndValue({str:'O=T1',rule='utf8'})
Parameters:
{Array} params
JSON object for parameters (ex. {str: 'C=US'})
See:
KJUR.asn1.x509.X500Name
KJUR.asn1.x509.RDN
KJUR.asn1.x509.AttributeTypeAndValue
X509#getAttrTypeAndValue

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