PKI-Lite - v1.0.5
    Preparing search index...

    Class BaseStringBlock<T, J>Abstract

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Type Parameters

      • T extends LocalStringValueBlock = LocalStringValueBlock
      • J extends LocalStringValueBlockJson = LocalStringValueBlockJson

      Parameters

      Returns BaseStringBlock<T, J>

    Properties

    blockLength: number
    error: string
    idBlock: LocalIdentificationBlock
    lenBlock: LocalLengthBlock
    name: string
    optional: boolean
    primitiveSchema?: BaseBlock<ValueBlock, LocalBaseBlockJson>
    valueBeforeDecodeView: Uint8Array

    3.0.0

    valueBlock: T
    warnings: string[]
    NAME: string

    Name of the block

    Accessors

    • get valueBeforeDecode(): ArrayBuffer

      Returns ArrayBuffer

      since version 3.0.0

    • set valueBeforeDecode(value: ArrayBuffer): void

      Parameters

      • value: ArrayBuffer

      Returns void

      since version 3.0.0

    Methods

    • Base function for converting block from BER encoded array of bytes

      Parameters

      • inputBuffer: ArrayBuffer | Uint8Array<ArrayBufferLike>

        ASN.1 BER encoded array

      • inputOffset: number

        Offset in ASN.1 BER encoded array where decoding should be started

      • inputLength: number

        Maximum length of array of bytes which can be using in this function

      Returns number

      Offset after least decoded byte

    • Function converting ArrayBuffer into ASN.1 internal string

      Parameters

      • inputBuffer: ArrayBuffer | Uint8Array<ArrayBufferLike>

        ASN.1 BER encoded array

      Returns void

    • Creates a class object from the string

      Parameters

      • inputString: string

        Input string to convert from

      Returns void

    • String value

      Returns string

      3.0.0

    • Determines whether two object instances are equal

      Parameters

      • other: unknown

        Object to compare with the current object

      Returns other is BaseStringBlock<T, J>

    • Returns string

    • String value

      Parameters

      • value: string

        String value

      Returns void

      3.0.0

    • Encoding of current ASN.1 block into ASN.1 encoded array (BER rules)

      Parameters

      • OptionalsizeOnly: boolean

        Flag that we need only a size of encoding, not a real array of bytes

      • Optionalwriter: ViewWriter

      Returns ArrayBuffer

      ASN.1 BER encoded array

    • Returns a JSON representation of an object

      Returns BaseBlockJson<J>

      JSON object

    • Aux function, need to get a block name. Need to have it here for inheritance

      Returns string

      Returns name of the block