Class KJUR.asn1.DERTaggedObject
Extends
KJUR.asn1.ASN1Object.
class for ASN.1 DER TaggedObject
Defined in: asn1-1.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
class for ASN.1 DER TaggedObject
Parameter 'tagNoNex' is ASN.1 tag(T) value for this object. |
- Fields borrowed from class KJUR.asn1.ASN1Object:
- hL, hT, hTLV, hV, isModified, params
Method Attributes | Method Name and Description |
---|---|
setString(isExplicitFlag, tagNoHex, asn1Object)
set value by an ASN1Object
|
- Methods borrowed from class KJUR.asn1.ASN1Object:
- getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.DERTaggedObject()
class for ASN.1 DER TaggedObject
Parameter 'tagNoNex' is ASN.1 tag(T) value for this object. For example, if you find '[1]' tag in a ASN.1 dump, 'tagNoHex' will be 'a1'.
As for optional argument 'params' for constructor, you can specify *ANY* of following properties:
Parameter 'tagNoNex' is ASN.1 tag(T) value for this object. For example, if you find '[1]' tag in a ASN.1 dump, 'tagNoHex' will be 'a1'.
As for optional argument 'params' for constructor, you can specify *ANY* of following properties:
- tag - specify tag (default is 'a0' which means [0])
- explicit - specify true if this is explicit tag otherwise false (default is 'true').
- obj - specify ASN1Object or JSON object which will be tagged
- tage - specify tag with explicit
- tagi - specify tag with implicit
// by JSON new KJUR.asn1.DERTaggedObject({ tag:'a0', explicit: true, obj: { "prnstr": { "str": "aaa" } } }).tohex() // by ASN1Object object new KJUR.asn1.DERTaggedObject({ tage:'a0', obj: new KJUR.asn1.DERInteger({int: 3}) // explicit }) new KJUR.asn1.DERTaggedObject({ tagi:'a0', obj: new KJUR.asn1.DERInteger({int: 3}) // implicit }) new KJUR.asn1.DERTaggedObject({ tag:'a0', explicit: true, obj: new KJUR.asn1.DERInteger({int: 3}) // explicit }) // to hexadecimal d1 = new KJUR.asn1.DERUTF8String({str':'a'}) d2 = new KJUR.asn1.DERTaggedObject({'obj': d1}); hex = d2.tohex();
- See:
- KJUR_asn1.ASN1Util.newObject
Method Detail
setString(isExplicitFlag, tagNoHex, asn1Object)
set value by an ASN1Object
- Parameters:
- {Boolean} isExplicitFlag
- flag for explicit/implicit tag
- {Integer} tagNoHex
- hexadecimal string of ASN.1 tag
- {ASN1Object} asn1Object
- ASN.1 to encapsulate
- Deprecated:
- since jsrsasign 10.5.4 please use setByParam instead