mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 18:19:02 +00:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8783dbed1f | ||
|
|
514953c77c | ||
|
|
f41573ecb9 | ||
|
|
6eeaa74f01 | ||
|
|
b11ed58244 | ||
|
|
47679fe362 | ||
|
|
33ec3ca1f3 | ||
|
|
41c81d867f | ||
|
|
73217428e8 | ||
|
|
380462c1db |
@@ -88,7 +88,7 @@ public class CryptoUtils {
|
||||
* @return lowercase hexadecimal string
|
||||
*/
|
||||
public static String hmacSha256Hex(String key, String data) {
|
||||
return hmacSha256Hex(hmac256(key.getBytes(UTF8), data), data);
|
||||
return hmacSha256Hex(key.getBytes(UTF8), data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public class CryptoUtilsTest {
|
||||
@Test
|
||||
void testHmacSha256Hex() {
|
||||
String signature = CryptoUtils.hmacSha256Hex("your-real-key", "your-real-data");;
|
||||
assertEquals("41878ccd7ecd795a2dd7ec39be7f33fed4be3ec75f5307689e39dd6f41fdbaac", signature);
|
||||
assertEquals("f09adf5f4bf94eddecf0f7c8f39a3a8dc7f95ccdc2faf2e5330bc5a78e4bba95", signature);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user