docs: public String sign(String signatureBaseString) {
      if (privateKey == null) {
        throw new UnsupportedOperationException("Cannot sign the base string: no private key supplied.");
      }
  
      try {
        Signature signer = Signature.getInstance("SHA1withRSA");
        signer.initSign(privateKey);
        signer.update(signatureBaseString.getBytes("UTF-8"));
        byte[] signatureBytes = signer.sign();
        signatureBytes = Base64.encodeBase64(signatureBytes);
        return new String(signatureBytes, "UTF-8");
      }
      catch (NoSuchAlgorithmException e) {
        throw new IllegalStateException(e);
      }
      catch (InvalidKeyException e) {
        throw new IllegalStateException(e);
      }
      catch (SignatureException e) {
        throw new IllegalStateException(e);
      }
      catch (UnsupportedEncodingException e) {
        throw new RuntimeException(e);
      }
    }