@Override
  public int hashCode() {
    return Objects.hash(privateKey, 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