@me2em/crypto
    Preparing search index...

    Function unwrapKeyForMe

    • Unwraps a key envelope on the recipient side. Completes the same X3DH the initiator started, derives the identical wrapping key, decrypts.

      Memory hygiene: the X3DH shared secret and the wrapping key are wiped on every exit path — including DECRYPTION_FAILED.

      Parameters

      Returns Promise<Uint8Array>

      'DECRYPTION_FAILED' if the envelope was wrapped for a different key set (wrong OTK / wrong identity), or the envelope is corrupted. Mirrors completeX3DH strictness: myOneTimePreKey is REQUIRED.