org.bouncycastle.jcajce.provider.symmetric
Class ChaCha.Base7539
java.lang.Object
javax.crypto.CipherSpi
org.bouncycastle.jcajce.provider.symmetric.util.BaseWrapCipher
org.bouncycastle.jcajce.provider.symmetric.util.BaseStreamCipher
org.bouncycastle.jcajce.provider.symmetric.ChaCha.Base7539
- All Implemented Interfaces:
- PBE
- Enclosing class:
- ChaCha
- public static class ChaCha.Base7539
- extends BaseStreamCipher
ChaCha20 as defined in RFC 8439. Besides an IvParameterSpec carrying the nonce, which starts the key
stream at block 0, this accepts a BCChaCha20ParameterSpec or, from Java 11, the JDK's
ChaCha20ParameterSpec, which also give the initial block counter.
| Nested classes inherited from class org.bouncycastle.jcajce.provider.symmetric.util.PBE |
PBE.Util |
| Fields inherited from interface org.bouncycastle.jcajce.provider.symmetric.util.PBE |
GOST3411, MD2, MD5, OPENSSL, PKCS12, PKCS5S1, PKCS5S1_UTF8, PKCS5S2, PKCS5S2_UTF8, RIPEMD160, SHA1, SHA224, SHA256, SHA3_224, SHA3_256, SHA3_384, SHA3_512, SHA384, SHA512, SHA512_224, SHA512_256, SM3, TIGER |
|
Method Summary |
protected byte[] |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen)
|
protected int |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
|
protected java.security.AlgorithmParameters |
engineGetParameters()
|
protected void |
engineInit(int opmode,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChaCha.Base7539
public ChaCha.Base7539()
engineInit
protected void engineInit(int opmode,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
- Overrides:
engineInit in class BaseStreamCipher
- Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException
engineGetParameters
protected java.security.AlgorithmParameters engineGetParameters()
- Overrides:
engineGetParameters in class BaseStreamCipher
engineDoFinal
protected byte[] engineDoFinal(byte[] input,
int inputOffset,
int inputLen)
- Overrides:
engineDoFinal in class BaseStreamCipher
engineDoFinal
protected int engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws javax.crypto.ShortBufferException
- Overrides:
engineDoFinal in class BaseStreamCipher
- Throws:
javax.crypto.ShortBufferException