Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RSAPrivateKey

Represents the PrivateKeyInfo structure described in RFC3447

Hierarchy

Implements

Index

Constructors

Properties

coefficient: Integer
exponent1: Integer
exponent2: Integer
modulus: Integer
otherPrimeInfos?: OtherPrimeInfo[]
prime1: Integer
prime2: Integer
privateExponent: Integer
publicExponent: Integer
version: number
CLASS_NAME: string = "RSAPrivateKey"

Name of the class

Accessors

  • get className(): string

Methods

  • fromJSON(json: any): void
  • Converts JSON value into current object

    Parameters

    • json: any

      JSON object

    Returns void

  • fromSchema(schema: any): void
  • toSchema(): Sequence
  • toString(encoding?: "base64" | "base64url" | "hex"): string
  • blockName(): string
  • defaultValues(memberName: "version"): number
  • defaultValues(memberName: "modulus"): Integer
  • defaultValues(memberName: "publicExponent"): Integer
  • defaultValues(memberName: "privateExponent"): Integer
  • defaultValues(memberName: "prime1"): Integer
  • defaultValues(memberName: "prime2"): Integer
  • defaultValues(memberName: "exponent1"): Integer
  • defaultValues(memberName: "exponent2"): Integer
  • defaultValues(memberName: "coefficient"): Integer
  • defaultValues(memberName: "otherPrimeInfos"): OtherPrimeInfo[]
  • fromBER<T>(this: PkiObjectConstructor<T>, raw: BufferSource): T
  • Creates PKI object from the raw data

    Type Parameters

    Parameters

    • this: PkiObjectConstructor<T>
    • raw: BufferSource

      ASN.1 encoded raw data

    Returns T

    Initialized and filled current class object

  • schema(parameters?: SchemaParameters<{ coefficient?: string; exponent1?: string; exponent2?: string; modulus?: string; otherPrimeInfo?: OtherPrimeInfoSchema; otherPrimeInfosName?: string; prime1?: string; prime2?: string; privateExponent?: string; publicExponent?: string; version?: string }>): any
  • Returns value of pre-defined ASN.1 schema for current class

    asn

    ASN.1 schema

    RSAPrivateKey ::= Sequence {
       version           Version,
       modulus           Integer,  -- n
       publicExponent    Integer,  -- e
       privateExponent   Integer,  -- d
       prime1            Integer,  -- p
       prime2            Integer,  -- q
       exponent1         Integer,  -- d mod (p-1)
       exponent2         Integer,  -- d mod (q-1)
       coefficient       Integer,  -- (inverse of q) mod p
       otherPrimeInfos   OtherPrimeInfos OPTIONAL
    }
    
    OtherPrimeInfos ::= Sequence SIZE(1..MAX) OF OtherPrimeInfo
    

    Parameters

    • parameters: 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

    Returns any

    ASN.1 schema object

Generated using TypeDoc