Class KJUR.asn1.DERBitString
Extends
KJUR.asn1.ASN1Object.
class for ASN.1 DER encoded BitString primitive
Defined in: asn1-1.0.js.
Constructor Attributes | Constructor Name and Description |
---|---|
class for ASN.1 DER encoded BitString primitive
As for argument 'params' for constructor, you can specify one of following properties:
|
- Fields borrowed from class KJUR.asn1.ASN1Object:
- hL, hT, hTLV, hV, isModified
Method Attributes | Method Name and Description |
---|---|
<static> |
KJUR.asn1.DERBitString.newFalseArray(nLength)
generate an array of false with specified length
This static method may be useful to initialize boolean array.
|
<static> |
KJUR.asn1.DERBitString.setByBinaryString(binaryString)
set ASN.1 DER BitString by binary string
Its unused bits will be calculated automatically by length of
'binaryValue'.
|
<static> |
KJUR.asn1.DERBitString.setByBooleanArray(booleanArray)
set ASN.1 TLV value(V) by an array of boolean
NOTE: Trailing falses will be ignored.
|
<static> |
KJUR.asn1.DERBitString.setHexValueIncludingUnusedBits(newHexStringIncludingUnusedBits)
set ASN.1 value(V) by a hexadecimal string including unused bits
|
<static> |
KJUR.asn1.DERBitString.setUnusedBitsAndHexValue(unusedBits, hValue)
set ASN.1 value(V) by unused bit and hexadecimal string of value
|
Class Detail
KJUR.asn1.DERBitString()
class for ASN.1 DER encoded BitString primitive
As for argument 'params' for constructor, you can specify one of following properties:
As for argument 'params' for constructor, you can specify one of following properties:
- bin - specify binary string (ex. '10111')
- array - specify array of boolean (ex. [true,false,true,true])
- hex - specify hexadecimal string of ASN.1 value(V) including unused bits
Method Detail
<static>
{array}
KJUR.asn1.DERBitString.newFalseArray(nLength)
generate an array of false with specified length
This static method may be useful to initialize boolean array.
- Parameters:
- {Integer} nLength
- length of array to generate
- Returns:
- {array} array of boolean faluse
<static>
KJUR.asn1.DERBitString.setByBinaryString(binaryString)
set ASN.1 DER BitString by binary string
Its unused bits will be calculated automatically by length of
'binaryValue'.
NOTE: Trailing zeros '0' will be ignored.
NOTE: Trailing zeros '0' will be ignored.
- Parameters:
- {String} binaryString
- binary value string (i.e. '10111')
<static>
KJUR.asn1.DERBitString.setByBooleanArray(booleanArray)
set ASN.1 TLV value(V) by an array of boolean
NOTE: Trailing falses will be ignored.
- Parameters:
- {array} booleanArray
- array of boolean (ex. [true, false, true])
<static>
KJUR.asn1.DERBitString.setHexValueIncludingUnusedBits(newHexStringIncludingUnusedBits)
set ASN.1 value(V) by a hexadecimal string including unused bits
- Parameters:
- {String} newHexStringIncludingUnusedBits
<static>
KJUR.asn1.DERBitString.setUnusedBitsAndHexValue(unusedBits, hValue)
set ASN.1 value(V) by unused bit and hexadecimal string of value
- Parameters:
- {Integer} unusedBits
- {String} hValue