Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EncryptedContentInfo

Represents the EncryptedContentInfo structure described in RFC5652

Hierarchy

Implements

Index

Constructors

Properties

contentEncryptionAlgorithm: AlgorithmIdentifier
contentType: string
encryptedContent?: OctetString
CLASS_NAME: string = "EncryptedContentInfo"

Name of the class

Accessors

  • get className(): string

Methods

  • fromSchema(schema: any): void
  • getEncryptedContent(): ArrayBuffer
  • Returns concatenated buffer from encryptedContent field.

    since

    3.0.0

    throws

    Throws Error if encryptedContent is undefined

    Returns ArrayBuffer

    Array buffer

  • 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: "contentType"): string
  • defaultValues(memberName: "contentEncryptionAlgorithm"): AlgorithmIdentifier
  • defaultValues(memberName: "encryptedContent"): OctetString
  • 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

  • Returns value of pre-defined ASN.1 schema for current class

    asn

    ASN.1 schema

    EncryptedContentInfo ::= SEQUENCE {
       contentType ContentType,
       contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
       encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL }
    
    Comment: Strange, but modern crypto engines create ENCRYPTED_CONTENT as "[0] EXPLICIT EncryptedContent"
    
    EncryptedContent ::= OCTET STRING
    

    Parameters

    Returns any

    ASN.1 schema object

Generated using TypeDoc