hdfkDerive static method

List<int> hdfkDerive({
  1. required List<int> ikm,
  2. required HashFunc<HashState> hash,
  3. int length = 32,
  4. List<int>? salt,
  5. List<int>? info,
  6. bool hkdfExtract = true,
})

Implementation

static List<int> hdfkDerive({
  required List<int> ikm,
  required HashFunc hash,
  int length = 32,
  List<int>? salt,
  List<int>? info,
  bool hkdfExtract = true,
}) {
  final hdkf = HKDF(
    ikm: ikm,
    hash: hash,
    hkdfExtract: hkdfExtract,
    info: info,
    length: length,
    salt: salt,
  );
  try {
    return hdkf.derive();
  } finally {
    hdkf.clean();
  }
}