| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | Returns: The bytes of the computed Hi valueThe SecretKeyFactory to generate the SecretKey secretKeyFactory, int The length of the key (in bits) keyLength, char[] The char array to compute the Hi function value, byte[] The salt salt, int The number of iterations iterations)Compute the "Hi" function for SCRAM. |
| public static byte[] | Returns: The bytes of the computed HMAC valueA key of the given algorithm secretKeySpec, Mac A MAC instance of the given algorithm mac, byte[] The message to compute the HMAC message)Computes the HMAC of a given message. |
| public static String | Returns: The String representing the nonceThe length of the nonce, in characters/bytes size, SecureRandom The SecureRandom to use random)Generates a random string (called a 'nonce'), composed of ASCII printable characters, except comma (','). |
| public static String | Returns: The String representing the nonceThe length of the nonce, in characters/bytes size)Generates a random string (called a 'nonce'), composed of ASCII printable characters, except comma (','). |
| public static byte[] |
| EXCLUDED_CHAR | back to summary |
|---|---|
| private static final int EXCLUDED_CHAR | |
| MAX_ASCII_PRINTABLE_RANGE | back to summary |
|---|---|
| private static final int MAX_ASCII_PRINTABLE_RANGE | |
| MIN_ASCII_PRINTABLE_RANGE | back to summary |
|---|---|
| private static final int MIN_ASCII_PRINTABLE_RANGE | |
| CryptoUtil | back to summary |
|---|---|
| public CryptoUtil() | |
| hi | back to summary |
|---|---|
| public static byte[] hi(SecretKeyFactory secretKeyFactory, int keyLength, char[] value, byte[] salt, int iterations) Compute the "Hi" function for SCRAM.
| |
| hmac | back to summary |
|---|---|
| public static byte[] hmac(SecretKeySpec secretKeySpec, Mac mac, byte[] message) Computes the HMAC of a given message.
| |
| nonce | back to summary |
|---|---|
| public static String nonce(int size, SecureRandom random) Generates a random string (called a 'nonce'), composed of ASCII printable characters, except comma (',').
| |
| nonce | back to summary |
|---|---|
| public static String nonce(int size) Generates a random string (called a 'nonce'), composed of ASCII printable characters, except comma (','). It uses a default SecureRandom instance.
| |
| xor | back to summary |
|---|---|
| public static byte[] xor(byte[] value1, byte[] value2) throws IllegalArgumentException Computes a byte-by-byte xor operation.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final SecureRandom |
| Access | Constructor and Description |
|---|---|
| private |
| INSTANCE | back to summary |
|---|---|
| private static final SecureRandom INSTANCE | |
| SecureRandomHolder | back to summary |
|---|---|
| private SecureRandomHolder() | |