Class Index | File Index

Classes


Class KJUR.asn1.DERBitString


Extends KJUR.asn1.ASN1Object.
class for ASN.1 DER encoded BitString primitive
Defined in: asn1-1.0.js.

Class Summary
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:
  • bin - specify binary string (ex.
Fields borrowed from class KJUR.asn1.ASN1Object:
hL, hT, hTLV, hV, isModified
Method Summary
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:
  • 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
NOTE: 'params' can be omitted.
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.
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

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