PKI-Lite - v1.2.1
    Preparing search index...

    Represents a PKCS#7 EncryptedData structure.

    EncryptedData ::= SEQUENCE {
         version INTEGER,
         encryptedContentInfo EncryptedContentInfo
         unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL
    }
    

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    encryptedContentInfo: EncryptedContentInfo
    version: number

    Accessors

    • get pemHeader(): string

      Gets the PEM header name for this object type. Converts the class name to uppercase for use in PEM encoding.

      Returns string

    • get pkiType(): string

      Gets the PKI type name for this object (typically the class name). Used for PEM headers and debugging output.

      Returns string

    Methods

    • Compares this PKI object with another for equality. Two objects are considered equal if their DER encodings are identical.

      Parameters

      • other: PkiBase<any>

        The other PKI object to compare with

      Returns boolean

      true if the objects are equal, false otherwise

    • Returns a human-readable string representation of this object. By default, returns the same as toString(), but subclasses can override for more user-friendly output.

      Returns string

      A human-readable string representation

    • Creates an encrypted data structure using PBES2 (PBKDF2 + AES-256-CBC).

      Parameters

      • options: {
            contentType:
                | "DATA"
                | "SIGNED_DATA"
                | "ENVELOPED_DATA"
                | "SIGNED_AND_ENVELOPED_DATA"
                | "DIGESTED_DATA"
                | "ENCRYPTED_DATA"
                | "AUTHENTICATED_DATA"
                | "AUTH_ENVELOPED_DATA"
                | "TST_INFO";
            data: Uint8Array<ArrayBuffer>;
            iterations?: number;
            iv?: Uint8Array<ArrayBuffer>;
            password: string | Uint8Array<ArrayBuffer>;
            salt?: Uint8Array<ArrayBuffer>;
        }

        Configuration for creating encrypted data

      Returns Promise<EncryptedData>

      Promise resolving to the encrypted data