public class HashUtil extends Object
| 构造器和说明 |
|---|
HashUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
hmacSha1(byte[] data,
byte[] key)
Do HMAC-SHA1.
|
static String |
hmacSha256(byte[] data,
byte[] key)
Do HMAC-SHA256.
|
static String |
hmacSha256(byte[] data,
String key)
Do HMAC-SHA256.
|
static String |
hmacSha256(String data,
String key)
Do HMAC-SHA256.
|
static byte[] |
hmacSha256AsBytes(byte[] data,
byte[] key)
Do HMAC-SHA256.
|
static byte[] |
hmacSha256AsBytes(String data,
String key)
Do HMAC-SHA256.
|
static String |
sha1(byte[] input)
Generate SHA-1 as hex string (all lower-case).
|
static String |
sha1(String input)
Generate SHA-1 as hex string (all lower-case).
|
static byte[] |
sha1AsBytes(byte[] input)
Generate SHA-1 as bytes.
|
static byte[] |
sha1AsBytes(String input) |
static String |
sha256(byte[] input)
Generate SHA-256 as hex string (all lower-case).
|
static String |
sha256(String input)
Generate SHA-256 as hex string (all lower-case).
|
static byte[] |
sha256AsBytes(byte[] input)
Generate SHA-256 as bytes.
|
static byte[] |
sha256AsBytes(String input)
Generate SHA-256 as hex string (all lower-case).
|
static byte[] |
sha512AsBytes(byte[] input)
Generate SHA-512 as bytes.
|
public static String sha1(String input)
input - Input as string.public static String sha1(byte[] input)
input - Input as bytes.public static byte[] sha1AsBytes(String input)
public static byte[] sha1AsBytes(byte[] input)
input - Input as bytes.public static String sha256(String input)
input - Input as String.public static byte[] sha256AsBytes(String input)
input - Input as String.public static String sha256(byte[] input)
input - Input as bytes.public static byte[] sha256AsBytes(byte[] input)
input - Input as bytes.public static byte[] sha512AsBytes(byte[] input)
input - Input as bytes.public static byte[] hmacSha256AsBytes(byte[] data,
byte[] key)
public static String hmacSha256(byte[] data, byte[] key)
public static byte[] hmacSha1(byte[] data,
byte[] key)
public static String hmacSha256(String data, String key)
public static byte[] hmacSha256AsBytes(String data, String key)
Copyright © 2022. All rights reserved.