The parameters consist of a 12-byte nonce and an initial counter value expressed as a 32-bit integer.
This class can be used to initialize a Cipher
object that
implements the ChaCha20 algorithm.
Modifier and Type | Field and Description |
---|---|
private final int | |
private final byte[] | |
private static final int |
Access | Constructor and Description |
---|---|
public | ChaCha20ParameterSpec(byte[]
a 12-byte nonce value nonce, int the initial counter value counter)Constructs a parameter set for ChaCha20 from the given nonce and counter. |
Modifier and Type | Method and Description |
---|---|
public int | |
public byte[] | Returns: the nonce value. This method returns a new array each time this method is called.Returns the nonce value. |
counter | back to summary |
---|---|
private final int counter |
nonce | back to summary |
---|---|
private final byte[] nonce |
NONCE_LENGTH | back to summary |
---|---|
private static final int NONCE_LENGTH |
ChaCha20ParameterSpec | back to summary |
---|---|
public ChaCha20ParameterSpec(byte[] nonce, int counter) Constructs a parameter set for ChaCha20 from the given nonce and counter.
|
getCounter | back to summary |
---|---|
public int getCounter() Returns the configured counter value.
|
getNonce | back to summary |
---|---|
public byte[] getNonce() Returns the nonce value.
|