class ECDSAKey {

  public ECDSASignature sign(final byte[] hashedMessage) {
    try {
      assertEquals(hashedMessage.length, 32, "Sha-256 hashed message should have 32 bytes length");
      final ECDSASignature signature = sign(this.privateKey, hashedMessage);
      if (logger.isTraceEnabled()) {
        logger.trace("Message in hexa: {}", HexUtils.encode(hashedMessage));
        logger.trace("ECDSASignature signature: {}", signature);
      }
      return signature;
    } catch (final Throwable e) {
      throw new IllegalStateException(e);
    }
  }

  protected  ECDSAKey(final PrivateKey privateKey, final PublicKey publicKey,
      final ECDomainParameters ecParams);

}