Class: PkiObject
Hierarchy
-
PkiObject
↳
Accuracy
↳
AltName
↳
Holder
↳
V2Form
↳
CRLBag
↳
CertBag
↳
CertID
↳
MacData
↳
PFX
↳
Request
↳
SafeBag
↳
SignedCertificateTimestampList
↳
TSTInfo
↳
Time
Constructors
constructor
• new PkiObject(): PkiObject
Returns
Properties
CLASS_NAME
▪ Static
CLASS_NAME: string
= "PkiObject"
Name of the class
Accessors
className
• get
className(): string
Returns
string
Methods
fromSchema
▸ fromSchema(schema
): void
Converts parsed ASN.1 object into current class
Parameters
Name | Type | Description |
---|---|---|
schema | any | ASN.1 schema |
Returns
void
toJSON
▸ toJSON(): any
Converts the class to JSON object
Returns
any
JSON object
toSchema
▸ toSchema(encodeFlag?
): any
Converts current object to ASN.1 object and sets correct values
Parameters
Name | Type | Description |
---|---|---|
encodeFlag? | boolean | If param equal to false then creates schema via decoding stored value. In other case creates schema via assembling from cached parts |
Returns
any
ASN.1 object
toString
▸ toString(encoding?
): string
Parameters
Name | Type | Default value |
---|---|---|
encoding | "base64" | "base64url" | "hex" | "hex" |
Returns
string
blockName
▸ blockName(): string
Returns block name
Returns
string
Returns string block name
defaultValues
▸ defaultValues(memberName
): any
Returns default values for all class members
Parameters
Name | Type | Description |
---|---|---|
memberName | string | String name for a class member |
Returns
any
Default value
fromBER
▸ fromBER<T
>(this
, raw
): T
Creates PKI object from the raw data
Type parameters
Name | Type |
---|---|
T | extends PkiObject |
Parameters
Name | Type | Description |
---|---|---|
this | PkiObjectConstructor <T > | - |
raw | BufferSource | ASN.1 encoded raw data |
Returns
T
Initialized and filled current class object
schema
▸ schema(parameters?
): any
Returns value of pre-defined ASN.1 schema for current class
Parameters
Name | Type | Description |
---|---|---|
parameters | SchemaParameters <> | Input parameters for the schema |
Returns
any
ASN.1 schema object