newKeyPair method
Generates a new KeyPair
for this algorithm.
You can pass key generation preferences by specifying options
.
Implementation
@override
Future<EcKeyPair> newKeyPair() async {
final result = await invokeMethod(
'new_ec_secret_key',
{
'curve': keyPairType.name,
},
);
final d = result['d'] as Uint8List;
final x = result['x'] as Uint8List;
final y = result['y'] as Uint8List;
return EcKeyPairData(
d: d,
x: x,
y: y,
type: keyPairType,
);
}