code: @Override
      public String sign(String message, byte[] key) {
          Preconditions.checkNotNull(message);
          Preconditions.checkNotNull(key);
          try {
              // Get an hmac_sha1 key from the raw key bytes
              SecretKeySpec signingKey = new SecretKeySpec(key, HMAC_SHA_1);
  
              // Get an hmac_sha1 Mac instance and initialize with the signing key
              Mac mac = Mac.getInstance(HMAC_SHA_1);
              mac.init(signingKey);
  
              // Compute the hmac on input data bytes
              byte[] rawHmac = mac.doFinal(message.getBytes(Charsets.UTF_8));
  
              // Convert raw bytes to Hex
              return hexToString(rawHmac);
          } catch (Exception e) {
              throw new IllegalArgumentException(e);
          }
      }
docs: Sign a message with a key.
  
  @param message The message to sign
  @param key     The key to use
  @return The signed message (in hexadecimal)