code: public static byte[] HmacSha1(byte[] binaryData, String key) throws Exception {
  		try {
  			Mac mac = Mac.getInstance(HMAC_SHA1);
  			SecretKeySpec secretKey = new SecretKeySpec(key.getBytes(), HMAC_SHA1);
  			mac.init(secretKey);
  			byte[] HmacSha1Digest = mac.doFinal(binaryData);
  			return HmacSha1Digest;
  			
  		} catch (NoSuchAlgorithmException e) {
  			LOG.error("mac not find algorithm {}", HMAC_SHA1);
  			throw e;
  		} catch (InvalidKeyException e) {
  			LOG.error("mac init key {} occur a error {}", key, e.toString());
  			throw e;
  		} catch (IllegalStateException e) {
  			LOG.error("mac.doFinal occur a error {}", e.toString());
  			throw e;
  		}
  	}
docs: 计算数据的Hmac值
  
  @param binaryData
  二进制数据
  @param key
  秘钥
  @return 加密后的hmacsha1值