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

    Function lockSubjectWith

    • Encrypts the subject with a fresh content key and adds a hasSecret assertion holding that key locked through agent: the reference's lock_subject(KeyDerivationMethod::SSHAgent, id) under the ssh-agent feature, with the agent injected as SSHAgentParams::new_opt(salt, id, Some(agent)) does.

      id names the Ed25519 identity by its comment; an empty id selects the agent's only Ed25519 identity. The agent signs the salt, the key is HKDF-HMAC-SHA256 of that signature with the salt, and the content key is encrypted under it with the [4, Salt, id] parameters as AAD.

      Parameters

      Returns Promise<Envelope>

      EnvelopeError Components (components error: <message>, cause the ComponentsError) when the agent has no Ed25519 identity, several identities and no id, no identity with that comment, or refuses to sign