Skip to content
PKIjsPKIjsPKIjsv4.0.1

AttributeTypeAndValue

Represents the AttributeTypeAndValue structure described in RFC5280

new AttributeTypeAndValue(parameters?): AttributeTypeAndValue

Initializes a new instance of the AttributeTypeAndValue class

AttributeTypeAndValueParameters = {}

Initialization parameters

AttributeTypeAndValue

PkiObject.constructor

type: string

IAttributeTypeAndValue.type


value: AttributeValueType

IAttributeTypeAndValue.value


static CLASS_NAME: string = "AttributeTypeAndValue"

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


isEqual(compareTo): boolean

Compares two AttributeTypeAndValue values, or AttributeTypeAndValue with ArrayBuffer value

ArrayBuffer | AttributeTypeAndValue

The value compare to current

boolean


toJSON(): AttributeTypeAndValueJson

Converts the class to JSON object

AttributeTypeAndValueJson

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 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): AttributeValueType

Returns default values for all class members

"value"

String name for a class member

AttributeValueType

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?): any

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

SchemaParameters<{ type?: string; value?: string; }> = {}

Input parameters for the schema

any

ASN.1 schema object

PkiObject.schema