public class ChaCha20Cipher extends Object implements Cipher
Modifier and Type | Class and Description |
---|---|
protected static class |
ChaCha20Cipher.ChaChaEngine |
Cipher.Mode
Modifier and Type | Field and Description |
---|---|
protected ChaCha20Cipher.ChaChaEngine |
bodyEngine |
protected ChaCha20Cipher.ChaChaEngine |
headerEngine |
protected Mac |
mac |
protected Cipher.Mode |
mode |
Constructor and Description |
---|
ChaCha20Cipher() |
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm() |
int |
getAuthenticationTagSize() |
int |
getCipherBlockSize() |
int |
getIVSize() |
int |
getKdfSize() |
int |
getKeySize() |
String |
getTransformation() |
void |
init(Cipher.Mode mode,
byte[] key,
byte[] iv)
Initialize the cipher for encryption or decryption with the given key and initialization vector
|
void |
update(byte[] input,
int inputOffset,
int inputLen)
Performs in-place encryption or decryption on the given data.
|
void |
updateAAD(byte[] data,
int offset,
int length)
Adds the provided input data as additional authenticated data during encryption or decryption.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkSupported, update, updateAAD, updateWithAAD
protected final ChaCha20Cipher.ChaChaEngine headerEngine
protected final ChaCha20Cipher.ChaChaEngine bodyEngine
protected final Mac mac
protected Cipher.Mode mode
public String getAlgorithm()
getAlgorithm
in interface AlgorithmNameProvider
public void init(Cipher.Mode mode, byte[] key, byte[] iv) throws Exception
Cipher
public void updateAAD(byte[] data, int offset, int length) throws Exception
Cipher
public void update(byte[] input, int inputOffset, int inputLen) throws Exception
Cipher
public String getTransformation()
getTransformation
in interface CipherInformation
public int getIVSize()
getIVSize
in interface CipherInformation
public int getAuthenticationTagSize()
getAuthenticationTagSize
in interface CipherInformation
public int getCipherBlockSize()
getCipherBlockSize
in interface CipherInformation
public int getKdfSize()
getKdfSize
in interface CipherInformation
public int getKeySize()
getKeySize
in interface KeySizeIndicator
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.