SecretKeyData.randomWithBuffer constructor

SecretKeyData.randomWithBuffer(
  1. Uint8List bytes, {
  2. Random? random,
  3. bool overwriteWhenDestroyed = true,
  4. String? debugLabel,
})

Implementation

factory SecretKeyData.randomWithBuffer(
  Uint8List bytes, {
  Random? random,
  bool overwriteWhenDestroyed = true,
  String? debugLabel,
}) {
  fillBytesWithSecureRandom(bytes, random: random);
  return SecretKeyData._(
    bytes,
    overwriteWhenDestroyed: overwriteWhenDestroyed,
    debugLabel: debugLabel,
  );
}