Crypto Lib
    Preparing search index...

    Function decrypt

    • Decrypts a message with the user's private key, a session key or a password. One of decryptionKeys, sessionkeys or passwords must be specified (passing a combination of these options is not supported).

      Parameters

      • data: dataDecrypt

        Data to be decrypted.

        Parameters for OpenPGP message decryption.

        • passphrase: string

          Passphrase to unlock the private key for decryption.

        • message: string

          Armored encrypted message to decrypt.

        • publicKey: string

          Armored public key of the sender for signature verification.

        • OptionalprivateKey?: string

          Optional armored private key used for decryption.

      Returns Promise<{ data: string; signatureValid: boolean }>

      • The decrypted message body and a boolean indicating whether the signature (if any) verified.