Class Nonce
- java.lang.Object
-
- org.activecomponents.udp.symciphers.Nonce
-
public class Nonce extends java.lang.ObjectClass representing an unsigned 128 bit value used as nonce;
-
-
Field Summary
Fields Modifier and Type Field Description static intSIZESize of the nonce in bytes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddec()Decreases the value by one.byte[]getAsBytes()Returns the value as a byte array.voidinc()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.
-
-