Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Time

Represents the Time structure described in RFC5280

Hierarchy

Implements

Index

Constructors

Properties

type: TimeType

0 - UTCTime; 1 - GeneralizedTime; 2 - empty value

value: Date

Value of the TIME class

CLASS_NAME: string = "Time"

Name of the class

Accessors

  • get className(): string

Methods

  • fromSchema(schema: any): void
  • toSchema(): UTCTime | GeneralizedTime
  • Converts current object to ASN.1 object and sets correct values

    Returns UTCTime | GeneralizedTime

    ASN.1 object

  • toString(encoding?: "base64" | "base64url" | "hex"): string
  • blockName(): string
  • defaultValues(memberName: "type"): TimeType
  • defaultValues(memberName: "value"): Date
  • Returns default values for all class members

    Parameters

    • memberName: "type"

      String name for a class member

    Returns TimeType

    Default value

  • Parameters

    • memberName: "value"

    Returns Date

  • 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?: TimeSchema, optional?: boolean): any
  • Returns value of pre-defined ASN.1 schema for current class

    asn

    ASN.1 schema

    Time ::= CHOICE {
      utcTime        UTCTime,
      generalTime    GeneralizedTime }
    

    Parameters

    • parameters: TimeSchema = {}

      Input parameters for the schema

    • optional: boolean = false

      Flag that current schema should be optional

    Returns any

    ASN.1 schema object

Generated using TypeDoc