Class Nonce
- java.lang.Object
-
- org.activecomponents.udp.symciphers.Nonce
-
public class Nonce extends java.lang.Object
Class representing an unsigned 128 bit value used as nonce;
-
-
Field Summary
Fields Modifier and Type Field Description static int
SIZE
Size of the nonce in bytes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dec()
Decreases the value by one.byte[]
getAsBytes()
Returns the value as a byte array.void
inc()
Increases the value by one.
-
-
-
Field Detail
-
SIZE
public static final int SIZE
Size of the nonce in bytes.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Nonce
public Nonce()
Creates nonce with value 0.
-
Nonce
public Nonce(byte[] input)
Initializes nonce with given value.- Parameters:
input
- The value.
-
Nonce
public Nonce(java.security.SecureRandom secrandom)
Initializes nonce with random value.- Parameters:
secrandom
- The random number source.
-
-