deserialize function

AsymmetricKeyPair<PublicKey, PrivateKey> deserialize(
  1. BigInt d
)

Reconstructs a private key and returns a key pair.

Implementation

AsymmetricKeyPair deserialize(BigInt d) {
  // ignore: omit_local_variable_types
  ECPrivateKey privateKey = ECPrivateKey(d, ecParams);
  // ignore: omit_local_variable_types
  ECPublicKey publicKey = _derivePublicKeyFrom(privateKey);

  return AsymmetricKeyPair(publicKey, privateKey);
}