(byte[] data, byte[] key)
| 289 | |
| 290 | |
| 291 | public static byte[] hamcsha1(byte[] data, byte[] key) { |
| 292 | try { |
| 293 | SecretKeySpec signingKey = new SecretKeySpec(key, "HmacSHA1"); |
| 294 | Mac mac = Mac.getInstance("HmacSHA1"); |
| 295 | mac.init(signingKey); |
| 296 | return mac.doFinal(data); |
| 297 | } catch (Exception localException) { |
| 298 | } |
| 299 | return null; |
| 300 | } |
| 301 | |
| 302 | |
| 303 | private static final char[] baseChars = { |