@Override
  public String toString() {
    return ("KeyPair{privateKey: "
        + this.privateKey.toString()
        + ", publicKey: "
        + this.publicKey.toString()
        + "]");
  }
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