Skip to content
PKIjsPKIjsPKIjsv4.0.1

EncryptedContentInfo

Represents the EncryptedContentInfo structure described in RFC5652

new EncryptedContentInfo(parameters?): EncryptedContentInfo

Initializes a new instance of the EncryptedContentInfo class

EncryptedContentParameters = {}

Initialization parameters

EncryptedContentInfo

PkiObject.constructor

contentEncryptionAlgorithm: AlgorithmIdentifier

IEncryptedContentInfo.contentEncryptionAlgorithm


contentType: string

IEncryptedContentInfo.contentType


optional encryptedContent?: OctetString

IEncryptedContentInfo.encryptedContent


static CLASS_NAME: string = "EncryptedContentInfo"

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


getEncryptedContent(): ArrayBuffer

Returns concatenated buffer from encryptedContent field.

ArrayBuffer

Array buffer

3.0.0

Throws Error if encryptedContent is undefined


toJSON(): EncryptedContentInfoJson

Converts the class to JSON object

EncryptedContentInfoJson

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

Compare 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

"contentType"

String name for a class member

string

Default value

PkiObject.defaultValues

static defaultValues(memberName): AlgorithmIdentifier

Returns default values for all class members

"contentEncryptionAlgorithm"

String name for a class member

AlgorithmIdentifier

Default value

PkiObject.defaultValues

static defaultValues(memberName): OctetString

Returns default values for all class members

"encryptedContent"

String name for a class member

OctetString

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

EncryptedContentInfoSchema = {}

Input parameters for the schema

any

ASN.1 schema object

PkiObject.schema