Nist256p1Verifier.fromKeyBytes constructor

Nist256p1Verifier.fromKeyBytes(
  1. List<int> keyBytes
)

Factory method to create a Nist256p1Verifier from a byte representation of a public key.

Implementation

factory Nist256p1Verifier.fromKeyBytes(List<int> keyBytes) {
  final point = ProjectiveECCPoint.fromBytes(
      curve: CryptoSignerConst.nist256.curve, data: keyBytes, order: null);
  final verifyingKey = ECDSAPublicKey(CryptoSignerConst.nist256, point);
  return Nist256p1Verifier._(ECDSAVerifyKey(verifyingKey));
}