@Override
  public boolean equals(final Object other) {
    if (!(other instanceof KeyPair)) {
      return false;
    }

    final KeyPair that = (KeyPair) other;
    return this.privateKey.equals(that.privateKey) && this.publicKey.equals(that.publicKey);
  }
Generate key pair.

@param keyPairGenerator the key pair generator
@param algorithm the algorithm
@return the key pair
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/KeyPair.java