code: public String sha1() {
          try {
              final SecretKeySpec keySpec = new SecretKeySpec(secret.getPlainText().getBytes(UTF_8), HMAC_SHA1_ALGORITHM);
              final Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM);
              mac.init(keySpec);
              final byte[] rawHMACBytes = mac.doFinal(payload.getBytes(UTF_8));
  
              return Hex.encodeHexString(rawHMACBytes);
          } catch (Exception e) {
              LOGGER.error("", e);
              return INVALID_SIGNATURE;
          }
      }
docs: Computes a RFC 2104-compliant HMAC digest using SHA1 of a payloadFrom with a given key (secret).
  
  @return HMAC digest of payloadFrom using secret as key. Will return COMPUTED_INVALID_SIGNATURE
  on any exception during computation.