public class BcAEADUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
BcAEADUtil.PGPAeadInputStream |
protected static class |
BcAEADUtil.PGPAeadOutputStream |
Constructor and Description |
---|
BcAEADUtil() |
Modifier and Type | Method and Description |
---|---|
static org.bouncycastle.crypto.modes.AEADBlockCipher |
createAEADCipher(int encAlgorithm,
int aeadAlgorithm) |
protected static long |
getChunkLength(int chunkSize)
Calculate an actual chunk length from the encoded chunk size.
|
protected static byte[] |
getNonce(byte[] iv,
long chunkIndex)
Generate a nonce by xor-ing the given iv with the chunk index.
|
protected static void |
xorChunkId(byte[] nonce,
long chunkIndex)
XOR the byte array with the chunk index in-place.
|
protected static byte[] getNonce(byte[] iv, long chunkIndex)
iv
- initialization vectorchunkIndex
- chunk indexprotected static void xorChunkId(byte[] nonce, long chunkIndex)
nonce
- byte arraychunkIndex
- chunk indexprotected static long getChunkLength(int chunkSize)
chunkSize
- encoded chunk sizepublic static org.bouncycastle.crypto.modes.AEADBlockCipher createAEADCipher(int encAlgorithm, int aeadAlgorithm) throws PGPException
PGPException