public class HashCrypto extends Object
| Constructor and Description |
|---|
HashCrypto() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
hmacSha256(byte[] data,
byte[] keyBytes)
HMAC_SHA56 hash function
|
static byte[] |
pbkdf2WithHmacSha256(byte[] password,
byte[] salt,
int iteration)
PBKDF2(Password-Based Key Derivation Function) with hmac sha256 key derivation function.
|
public static byte[] hmacSha256(byte[] data,
byte[] keyBytes)
throws Exception
data - specified message data in byte arraykeyBytes - specified key in byte arrayException - NoSuchAlgorithmException, InvalidKeyException, IllegalStateException, IllegalArgumentExceptionpublic static byte[] pbkdf2WithHmacSha256(byte[] password,
byte[] salt,
int iteration)
password - specified password in byte arraysalt - specified salt in byte arrayiteration - iteration counterCopyright © 2020. All rights reserved.