Asn1BitString
ASN.1 BIT STRING
Constructors
Creates an ASN.1 BIT STRING from the provided bitSet. The transformation to rawBytes and the calculation of numPaddingBits happens immediately in the constructor. Hence, modifications to the source BitSet have no effect on the resulting Asn1BitString.
Properties
Number of bits needed to pad the bit string to a byte boundary
The raw bytes containing the bit string. The bits contained in rawBytes are laid out, as printed when calling BitSet.toBitString, right-padded with numPaddingBits many zero bits to the last byte boundary.
Functions
Convenience function to directly get the DER-encoded representation of the implementing object
Exception-free version of encodeToDer
Safe version of encodeToDer, wrapping the result into a KmmResult
Encodes the implementing object into an A
Exception-free version of encodeToTlv
Safe version of encodeToTlv, wrapping the result into a KmmResult
Transforms rawBytes and wraps into a BitSet. The last numPaddingBits bits are ignored. This is a deep copy and mirrors the bits in every byte to match the native bitset layout where bit any byte indices run in opposite direction. Hence, modifications to the resulting bitset do not affect rawBytes
Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. NOTE: The TagClass of the provided tag will be used! If you want the result to have TagClass.CONTEXT_SPECIFIC, also invoke tag withClass TagClass.CONTEXT_SPECIFIC
!. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero
Creates a new implicitly tagged ASN.1 Element from this ASN.1 Structure. If the provided template's tagClass is not set, the class of the resulting structure defaults to TagClass.CONTEXT_SPECIFIC. If a CONSTRUCTED Tag is applied to an ASN.1 Primitive, the CONSTRUCTED bit is overridden and set to zero
Creates a new implicitly tagged ASN.1 Element from this ASN.1 Element. Sets the class of the resulting structure to TagClass.CONTEXT_SPECIFIC