Package de.uplanet.security
Class Nonce
java.lang.Object
de.uplanet.security.Nonce
Used to create cryptographically secure random bits
that can be used as nonce values.
-
Method Summary
-
Method Details
-
getString
Create a cryptographically secure hex-encoded nonce value of the given length in bytes.Note that the length of the returned hex-encoded string is twice of the length in bytes.
- Parameters:
p_iLen
- The length of the nonce value in bytes.- Returns:
- The hex-encoded nonce value.
-
getBinary
public static byte[] getBinary(int p_iLen) Create a cryptographically secure hex-encoded nonce value of the given length in bytes.- Parameters:
p_iLen
- The length of the nonce value in bytes.- Returns:
- The nonce value.
-