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

    Function addSecret

    • Adds a hasSecret assertion holding contentKey locked by secret via method (the reference's add_secret), for an envelope whose subject was encrypted with contentKey.

      Parameters

      • envelope: Envelope
      • method: KeyDerivationMethod
      • secret: Uint8Array
      • contentKey: SymmetricKey

      Returns Envelope

      EnvelopeError InvalidParameter for a value outside KeyDerivationMethod; Components when components cannot lock the key (KeyDerivationMethod.SSHAgent needs an agent: see lockSubjectWith)