code: protected String computeSha1Signature(String baseString, @Sensitive String keyString) throws GeneralSecurityException, UnsupportedEncodingException {
  
          byte[] keyBytes = keyString.getBytes(CommonWebConstants.UTF_8);
          SecretKey secretKey = new SecretKeySpec(keyBytes, "HmacSHA1");
  
          Mac mac = Mac.getInstance("HmacSHA1");
          mac.init(secretKey);
  
          byte[] text = baseString.getBytes(CommonWebConstants.UTF_8);
  
          return new String(Base64.encodeBase64(mac.doFinal(text)), CommonWebConstants.UTF_8).trim();
      }
docs: Computes the HMAC-SHA1 signature of the provided baseString using keyString as the secret key.
  
  @param baseString
  @param keyString
  @return
  @throws GeneralSecurityException
  @throws UnsupportedEncodingException