@icp-sdk/vetkeys - v0.5.0
    Preparing search index...

    Function deriveSymmetricKey

    • Derive a symmetric key from the provided input using HKDF-SHA256.

      The input parameter should be a sufficiently long random input generated in a secure way. 256 bits (32 bytes) or longer is preferable.

      The domainSep parameter should be a string unique to your application and also your usage of the resulting key. For example say your application "my-app" is deriving two keys, one for usage "foo" and the other for "bar". You might use as domain separators "my-app-foo" and "my-app-bar".

      The returned Uint8Array will be outputLength bytes long.

      Parameters

      • input: Uint8Array
      • domainSep: string | Uint8Array<ArrayBufferLike>
      • outputLength: number

      Returns Uint8Array