Skip to content
PKIjsPKIjsPKIjsv4.0.1

RSAPublicKey

Represents the RSAPublicKey structure described in RFC3447

new RSAPublicKey(parameters?): RSAPublicKey

Initializes a new instance of the RSAPublicKey class

RSAPublicKeyParameters = {}

Initialization parameters

RSAPublicKey

PkiObject.constructor

modulus: Integer

Modulus part of RSA public key

IRSAPublicKey.modulus


publicExponent: Integer

Public exponent of RSA public key

IRSAPublicKey.publicExponent


static CLASS_NAME: string = "RSAPublicKey"

Name of the class

PkiObject.CLASS_NAME

get className(): string

string

PkiObject.className

fromJSON(json): void

Converts JSON value into current object

RSAPublicKeyJson

JSON object

void


fromSchema(schema): void

Converts parsed ASN.1 object into current class

AsnType

ASN.1 schema

void

PkiObject.fromSchema


toJSON(): RSAPublicKeyJson

Converts the class to JSON object

RSAPublicKeyJson

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

Returns default values for all class members

"modulus" | "publicExponent"

String name for a class member

Integer

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<{ modulus?: string; publicExponent?: string; }> = {}

Input parameters for the schema

any

ASN.1 schema object

PkiObject.schema