Skip to main content

GeneralizedTime

Extends

Constructors

new GeneralizedTime()

new GeneralizedTime(parameters): GeneralizedTime

Parameters

parameters: UTCTimeParams = {}

Returns

GeneralizedTime

Overrides

UTCTime.constructor

Properties

blockLength

blockLength: number

Inherited from

UTCTime.blockLength


day

day: number

Inherited from

UTCTime.day


error

error: string

Inherited from

UTCTime.error


hour

hour: number

Inherited from

UTCTime.hour


idBlock

idBlock: LocalIdentificationBlock

Inherited from

UTCTime.idBlock


lenBlock

lenBlock: LocalLengthBlock

Inherited from

UTCTime.lenBlock


millisecond

millisecond: number


minute

minute: number

Inherited from

UTCTime.minute


month

month: number

Inherited from

UTCTime.month


name

name: string

Inherited from

UTCTime.name


optional

optional: boolean

Inherited from

UTCTime.optional


primitiveSchema?

optional primitiveSchema: BaseBlock<ValueBlock, LocalBaseBlockJson>

Inherited from

UTCTime.primitiveSchema


second

second: number

Inherited from

UTCTime.second


valueBeforeDecodeView

valueBeforeDecodeView: Uint8Array

Since

3.0.0

Inherited from

UTCTime.valueBeforeDecodeView


valueBlock

valueBlock: LocalSimpleStringValueBlock

Inherited from

UTCTime.valueBlock


warnings

warnings: string[]

Inherited from

UTCTime.warnings


year

year: number

Inherited from

UTCTime.year


NAME

static NAME: string = "GeneralizedTime"

Overrides

UTCTime.NAME

Accessors

valueBeforeDecode

get valueBeforeDecode(): ArrayBuffer

Deprecated

since version 3.0.0

set valueBeforeDecode(value): void

Deprecated

since version 3.0.0

Parameters

value: ArrayBuffer

Returns

ArrayBuffer

Inherited from

UTCTime.valueBeforeDecode

Methods

fromBER()

fromBER(inputBuffer, inputOffset, inputLength): number

Parameters

inputBuffer: Uint8Array | ArrayBuffer

inputOffset: number

inputLength: number

Returns

number

Inherited from

UTCTime.fromBER


fromBuffer()

fromBuffer(inputBuffer): void

Function converting ArrayBuffer into ASN.1 internal string

Parameters

inputBuffer: Uint8Array | ArrayBuffer

ASN.1 BER encoded array

Returns

void

Inherited from

UTCTime.fromBuffer


fromDate()

fromDate(inputDate): void

Function converting "Date" object into ASN.1 internal string

Parameters

inputDate: Date

JavaScript "Date" object

Returns

void

Overrides

UTCTime.fromDate


fromString()

fromString(inputString): void

Parameters

inputString: string

Returns

void

Overrides

UTCTime.fromString


getValue()

getValue(): string

String value

Returns

string

Since

3.0.0

Inherited from

UTCTime.getValue


isEqual()

isEqual(other): other is GeneralizedTime

Determines whether two object instances are equal

Parameters

other: unknown

Object to compare with the current object

Returns

other is GeneralizedTime

Inherited from

UTCTime.isEqual


onAsciiEncoding()

protected onAsciiEncoding(): string

Returns

string

Inherited from

UTCTime.onAsciiEncoding


setValue()

setValue(value): void

String value

Parameters

value: string

String value

Returns

void

Since

3.0.0

Inherited from

UTCTime.setValue


toBER()

toBER(sizeOnly?, writer?): ArrayBuffer

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

Parameters

sizeOnly?: boolean

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

writer?: ViewWriter

Returns

ArrayBuffer

ASN.1 BER encoded array

Inherited from

UTCTime.toBER


toBuffer()

toBuffer(): ArrayBuffer

Function converting ASN.1 internal string into ArrayBuffer

Returns

ArrayBuffer

Inherited from

UTCTime.toBuffer


toDate()

toDate(): Date

Converts a class object into the JavaScrip Date Object

Returns

Date

Date object

Overrides

UTCTime.toDate


toJSON()

toJSON(): GeneralizedTimeJson

Returns a JSON representation of an object

Returns

GeneralizedTimeJson

JSON object

Overrides

UTCTime.toJSON


toString()

toString(encoding): string

Returns a string representation of an object.

Parameters

encoding: DateStringEncoding = "iso"

Returns

string

Overrides

UTCTime.toString


blockName()

static blockName(): string

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

Returns

string

Returns name of the block

Inherited from

UTCTime.blockName