keyGen function

UnmodifiableUint8ListView keyGen ()

Generates a key for auth.

Implementation

UnmodifiableUint8ListView keyGen() {
  final keyPtr = Uint8Array.allocate(count: bindings.keyBytes);
  bindings.keyGen(keyPtr.rawPtr);
  keyPtr.freeZero();
  final key = Uint8List.fromList(keyPtr.view);
  return UnmodifiableUint8ListView(key);
}