Skip to main content

PkiObject

Extended by​

Constructors​

Constructor​

new PkiObject(): PkiObject

Returns​

PkiObject

Properties​

CLASS_NAME​

static CLASS_NAME: string = "PkiObject"

Name of the class

Accessors​

className​

Get Signature​

get className(): string

Returns​

string

Methods​

fromSchema()​

abstract fromSchema(schema): void

Converts parsed ASN.1 object into current class

Parameters​

schema​

any

ASN.1 schema

Returns​

void


toJSON()​

abstract toJSON(): any

Converts the class to JSON object

Returns​

any

JSON object


toSchema()​

abstract toSchema(encodeFlag?): any

Converts current object to ASN.1 object and sets correct values

Parameters​

encodeFlag?​

boolean

If param equal to false then creates schema via decoding stored value. In other case creates schema via assembling from cached parts

Returns​

any

ASN.1 object


toString()​

toString(encoding?): string

Parameters​

encoding?​

"hex" | "base64" | "base64url"

Returns​

string


blockName()​

static blockName(): string

Returns block name

Returns​

string

Returns string block name


defaultValues()​

static defaultValues(memberName): any

Returns default values for all class members

Parameters​

memberName​

string

String name for a class member

Returns​

any

Default value


fromBER()​

static fromBER<T>(this, raw): T

Creates PKI object from the raw data

Type Parameters​

T​

T extends PkiObject

Parameters​

this​

PkiObjectConstructor<T>

raw​

BufferSource

ASN.1 encoded raw data

Returns​

T

Initialized and filled current class object


schema()​

static schema(parameters?): any

Returns value of pre-defined ASN.1 schema for current class

Parameters​

parameters?​

SchemaParameters = {}

Input parameters for the schema

Returns​

any

ASN.1 schema object