equals method

  1. @override
Future<bool> equals(
  1. PublicKey other
)
override

Checks if this public key is equal to another

Implementation

@override
Future<bool> equals(p2pkeys.PublicKey other) async {
  if (other is! EcdsaPublicKey) return false;

  // Compare the Q points
  final q1 = _key.Q!;
  final q2 = other._key.Q!;

  return q1.x!.toBigInteger() == q2.x!.toBigInteger() &&
         q1.y!.toBigInteger() == q2.y!.toBigInteger();
}