generateRandomKey method

JsonWebKey generateRandomKey({
  1. int? keyBitLength,
})

Implementation

JsonWebKey generateRandomKey({int? keyBitLength}) {
  final res = jwkFromCryptoKeyPair(
    generateCryptoKeyPair(keyBitLength: keyBitLength),
  );
  if (res == null) {
    throw UnimplementedError('Unkown key type.');
  }
  return res;
}