Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SafeBag<T>

Represents the SafeBag structure described in RFC7292

Type Parameters

Hierarchy

Implements

Index

Constructors

Properties

bagAttributes?: Attribute[]
bagId: string
bagValue: T
CLASS_NAME: string = "SafeBag"

Name of the class

Accessors

  • get className(): string

Methods

  • fromSchema(schema: any): void
  • toSchema(): Sequence
  • toString(encoding?: "base64" | "base64url" | "hex"): string
  • blockName(): string
  • compareWithDefault(memberName: string, memberValue: any): boolean
  • Compare values with default values for all class members

    Parameters

    • memberName: string

      String name for a class member

    • memberValue: any

      Value to compare with default value

    Returns boolean

  • defaultValues(memberName: "bagId"): string
  • defaultValues(memberName: "bagValue"): BagType
  • defaultValues(memberName: "bagAttributes"): Attribute[]
  • 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<{ bagAttributes?: string; bagId?: string; bagValue?: string }>): any
  • Returns value of pre-defined ASN.1 schema for current class

    asn

    ASN.1 schema

    SafeBag ::= SEQUENCE {
       bagId         BAG-TYPE.&id ({PKCS12BagSet}),
       bagValue      [0] EXPLICIT BAG-TYPE.&Type({PKCS12BagSet}{@bagId}),
       bagAttributes SET OF PKCS12Attribute OPTIONAL
    }
    

    Parameters

    • parameters: SchemaParameters<{ bagAttributes?: string; bagId?: string; bagValue?: string }> = {}

      Input parameters for the schema

    Returns any

    ASN.1 schema object

Generated using TypeDoc