lacewing - v2.0.1
    Preparing search index...

    Function generateDirectKey

    • Generate a random direct (alg: "dir") key sized to a content-encryption algorithm. The key is the content-encryption key, so it is inseparable from its enc: a 32-byte key is for A256GCM/A128CBC-HS256, and so on.

      Type Parameters

      • const Enc extends string

      Parameters

      Returns LacewingEncryptionKey<"dir">