Skip to content
PKIjsPKIjsPKIjsv4.0.1

RSAPrivateKey

Represents the PrivateKeyInfo structure described in RFC3447

new RSAPrivateKey(parameters?): RSAPrivateKey

Initializes a new instance of the RSAPrivateKey class

RSAPrivateKeyParameters = {}

Initialization parameters

RSAPrivateKey

PkiObject.constructor

coefficient: Integer

IRSAPrivateKey.coefficient


exponent1: Integer

IRSAPrivateKey.exponent1


exponent2: Integer

IRSAPrivateKey.exponent2


modulus: Integer

IRSAPrivateKey.modulus


optional otherPrimeInfos?: OtherPrimeInfo[]

IRSAPrivateKey.otherPrimeInfos


prime1: Integer

IRSAPrivateKey.prime1


prime2: Integer

IRSAPrivateKey.prime2


privateExponent: Integer

IRSAPrivateKey.privateExponent


publicExponent: Integer

IRSAPrivateKey.publicExponent


version: number

IRSAPrivateKey.version


static CLASS_NAME: string = "RSAPrivateKey"

Name of the class

PkiObject.CLASS_NAME

get className(): string

string

PkiObject.className

fromJSON(json): void

Converts JSON value into current object

any

JSON object

void


fromSchema(schema): void

Converts parsed ASN.1 object into current class

any

ASN.1 schema

void

PkiObject.fromSchema


toJSON(): RSAPrivateKeyJson

Converts the class to JSON object

RSAPrivateKeyJson

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

Returns default values for all class members

"version"

String name for a class member

number

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"modulus"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"publicExponent"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"privateExponent"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"prime1"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"prime2"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"exponent1"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"exponent2"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): Integer

Returns default values for all class members

"coefficient"

String name for a class member

Integer

Default value

PkiObject.defaultValues

static defaultValues(memberName): OtherPrimeInfo[]

Returns default values for all class members

"otherPrimeInfos"

String name for a class member

OtherPrimeInfo[]

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<{ coefficient?: string; exponent1?: string; exponent2?: string; modulus?: string; otherPrimeInfo?: OtherPrimeInfoSchema; otherPrimeInfosName?: string; prime1?: string; prime2?: string; privateExponent?: string; publicExponent?: string; version?: string; }> = {}

Input parameters for the schema

any

ASN.1 schema object

PkiObject.schema