equals method

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

Checks if this private key is equal to another

Implementation

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

  // Compare public keys (modulus and exponent)
  final publicKeyEquals = await _publicKey.equals(other.publicKey);
  if (!publicKeyEquals) return false;

  // Compare private exponent
  return _key.privateExponent == other._key.privateExponent;
}