@blockchaincommons/envelope - v1.0.0-beta.4
    Preparing search index...

    Function decryptSubjectToRecipient

    • Decrypts the envelope's subject with the content key the recipient's private key opens (the reference's decrypt_subject_to_recipient): the first sealed message the key opens yields the content key, which must decode as a SymmetricKey.

      Parameters

      • envelope: Envelope
      • recipient: Decrypter

        The recipient's private key (implements Decrypter)

      Returns Envelope

      A new envelope with decrypted subject

      EnvelopeError UnknownRecipient when no sealed message opens; Cbor (dcbor error: <message>) when the sealed plaintext is not a symmetric key; the errors of recipients and decryptSubject