@Override
  public byte[] getEncoded() {
    return encoded.toArrayUnsafe();
  }
Create secp private key.

@param key the key
@param algorithm the algorithm
@return the secp private key
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/SECPPrivateKey.java