Skip to content
PKIjsPKIjsPKIjsv4.0.1

ContentInfo

Represents the ContentInfo structure described in RFC5652

new ContentInfo(parameters?): ContentInfo

Initializes a new instance of the ContentInfo class

ContentInfoParameters = {}

Initialization parameters

ContentInfo

PkiObject.constructor

content: any

IContentInfo.content


contentType: string

IContentInfo.contentType


static CLASS_NAME: string = "ContentInfo"

Name of the class

PkiObject.CLASS_NAME


readonly static DATA: "1.2.840.113549.1.7.1" = id_ContentType_Data


readonly static ENCRYPTED_DATA: "1.2.840.113549.1.7.6" = id_ContentType_EncryptedData


readonly static ENVELOPED_DATA: "1.2.840.113549.1.7.3" = id_ContentType_EnvelopedData


readonly static SIGNED_DATA: "1.2.840.113549.1.7.2" = id_ContentType_SignedData

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(): ContentInfoJson

Converts the class to JSON object

ContentInfoJson

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<T>(memberName, memberValue): memberValue is T

Compare values with default values for all class members

T

string

String name for a class member

T

Value to compare with default value

memberValue is T


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

Returns default values for all class members

"content"

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

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

ContentInfoSchema = {}

Input parameters for the schema

any

ASN.1 schema object

PkiObject.schema