Class KJUR.asn1.DEROctetString
Extends
KJUR.asn1.DERAbstractString.
class for ASN.1 DER OctetString
Defined in: asn1-1.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
KJUR.asn1.DEROctetString(params)
class for ASN.1 DER OctetString
This class provides ASN.1 OctetString simple type. |
- Fields borrowed from class KJUR.asn1.DERAbstractString:
- s
- Fields borrowed from class KJUR.asn1.ASN1Object:
- hL, hT, hTLV, hV, isModified, params
- Methods borrowed from class KJUR.asn1.DERAbstractString:
- getString, setString, setStringHex
- Methods borrowed from class KJUR.asn1.ASN1Object:
- getEncodedHex, getLengthHexFromValue, getValueHex, tohex
Class Detail
KJUR.asn1.DEROctetString(params)
class for ASN.1 DER OctetString
This class provides ASN.1 OctetString simple type.
Supported "params" attributes are:
This class provides ASN.1 OctetString simple type.
Supported "params" attributes are:
- str - to set a string as a value
- hex - to set a hexadecimal string as a value
- obj - to set a encapsulated ASN.1 value by JSON object which is defined in KJUR.asn1.ASN1Util.newObject
// default constructor o = new KJUR.asn1.DEROctetString(); // initialize with string o = new KJUR.asn1.DEROctetString({str: "aaa"}); // initialize with hexadecimal string o = new KJUR.asn1.DEROctetString({hex: "616161"}); // initialize with ASN1Util.newObject argument o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}}); // above generates a ASN.1 data like this: // OCTET STRING, encapsulates { // SEQUENCE { // INTEGER 3 // PrintableString 'aaa' // } // }
- Parameters:
- {Array} params
- associative array of parameters (ex. {'str': 'aaa'})
- See:
- KJUR.asn1.DERAbstractString - superclass