code: public static byte[] signMessageWithPrivateKey(byte[] keyData, byte[] message, String signAlgo)
              throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException,
              SignatureException {
          RSAPrivateKey key = buildPrivateKey(keyData);
          return signMessage(key, message, signAlgo);
      }
docs: Sign a message with RSA private key.
  
  @param keyData
  RSA private key data (value of {@link RSAPrivateKey#getEncoded()})
  @param message
  @param signAlgo
  signature algorithm to use. If empty, {@link #DEFAULT_SIGNATURE_ALGORITHM} will be
  used.
  @return
  @throws NoSuchAlgorithmException
  @throws InvalidKeySpecException
  @throws InvalidKeyException
  @throws SignatureException