newKeyPair method

  1. @override
Future<KeyPair> newKeyPair()
override

Generates a new KeyPair that can be used with this algorithm.

Example

In this example, we use X25519:

import 'package:cryptography/cryptography.dart';

Future<void> main() async {
  final algorithm = X25519();
  final keyPair = await algorithm.newKeyPair();
}

Implementation

@override
Future<KeyPair> newKeyPair() {
  return fallback.newKeyPair();
}