Skip to content
PKIjsPKIjsPKIjsv4.0.1

Attribute

Represents the Attribute structure described in RFC2986

new Attribute(parameters?): Attribute

Initializes a new instance of the Attribute class

AttributeParameters = {}

Initialization parameters

Attribute

PkiObject.constructor

type: string

Specifies type of attribute value

IAttribute.type


values: any[]

List of attribute values

IAttribute.values


static CLASS_NAME: string = "Attribute"

Name of the class

PkiObject.CLASS_NAME

get className(): string

string

PkiObject.className

fromSchema(schema): void

Converts parsed ASN.1 object into current class

any

ASN.1 schema

void

PkiObject.fromSchema


toJSON(): AttributeJson

Converts the class to JSON object

AttributeJson

JSON object

PkiObject.toJSON


toSchema(): Sequence

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

Sequence

ASN.1 object

PkiObject.toSchema


toString(encoding?): string

"hex" | "base64" | "base64url" = "hex"

string

PkiObject.toString


static blockName(): string

Returns block name

string

Returns string block name

PkiObject.blockName


static compareWithDefault(memberName, memberValue): boolean

Compares values with default values for all class members

string

String name for a class member

any

Value to compare with default value

boolean


static defaultValues(memberName): string

Returns default values for all class members

"type"

String name for a class member

string

Default value

PkiObject.defaultValues

static defaultValues(memberName): any[]

Returns default values for all class members

"values"

String name for a class member

any[]

Default value

PkiObject.defaultValues


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

Creates PKI object from the raw data

T extends PkiObject

PkiObjectConstructor<T>

BufferSource

ASN.1 encoded raw data

T

Initialized and filled current class object

PkiObject.fromBER


static schema(parameters?): Sequence

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

AttributeSchema = {}

Input parameters for the schema

Sequence

ASN.1 schema object

PkiObject.schema