generateRandomAESKey function

String generateRandomAESKey({
  1. int length = 32,
})

Generate a random AESKey

Implementation

String generateRandomAESKey({int length = 32}) {
  return uint8ListToHex(
    Uint8List.fromList(
      List<int>.generate(length, (int i) => Random.secure().nextInt(256)),
    ),
  );
}