createVerifier method

Verifier<PublicKey> createVerifier(
  1. Identifier algorithm
)

Creates a signature Verifier using this key and the specified algorithm

Implementation

Verifier createVerifier(Identifier algorithm) {
  if (this is SymmetricKey) {
    return _SymmetricSignerAndVerifier(algorithm, this as SymmetricKey);
  }
  if (this is OkpPublicKey) {
    // EdDSA bypasses pointycastle (no Ed25519 support there).
    return _EddsaVerifier(algorithm, this);
  }

  return _AsymmetricVerifier(algorithm, this);
}