public class MixCipherChain
extends java.lang.Object
Constructor and Description |
---|
MixCipherChain(IMixCipher[] a_cipherChain) |
Modifier and Type | Method and Description |
---|---|
boolean |
decryptPacket(byte[] m_packet)
Decrypts the given packet and stores the plain text back into the
given byte buffer.
|
byte[] |
encryptPacket(byte[] a_plainPacket,
int a_virtualPacketLength,
java.util.Vector a_sendCallbackHandlers)
Encrypts the buffer for all mixes in the chain, last to first.
|
int |
getNextPacketEncryptionOverhead()
Returns the number of bytes the encryption of the next packet will
take up.
|
public MixCipherChain(IMixCipher[] a_cipherChain)
public byte[] encryptPacket(byte[] a_plainPacket, int a_virtualPacketLength, java.util.Vector a_sendCallbackHandlers)
a_plainPacket
- The plain text packet to be encrypted.a_virtualPacketLength
- The minimal length of the resulting packet.a_sendCallbackHandlers
- public int getNextPacketEncryptionOverhead()
Note: This is not the same as the size of the encrypted packet itself.
public boolean decryptPacket(byte[] m_packet)
m_packet
- byte array representing an encrypted packetCopyright © 2023. All rights reserved.