KeyPair constructor

KeyPair(
  1. PrivateKey privateKey,
  2. PublicKey publicKey
)

Implementation

KeyPair(this.privateKey, this.publicKey) {
  this.curve = this.privateKey.curve;

  if (this.privateKey.curve.id != this.publicKey.curve!.id) {
    throw Exception('Mixed up curves between private an public key');
  }
}