extract function

Uint8List extract({
  1. required Uint8List secret,
  2. required Uint8List salt,
})

Generates a 32-byte pseudorandom key for use with expand from an input secret and an optional independent salt.

Only use this function if you need to reuse the extracted key with multiple expand invocations and different context values. Most common scenarios, including the generation of multiple keys, should use key instead. The salt is optional; pass an empty list for none.

Implementation

Uint8List extract({required Uint8List secret, required Uint8List salt}) =>
    ffi.hkdfExtract(secret: secret, salt: salt);