public class FirstMixCipher extends java.lang.Object implements IMixCipher
| Modifier and Type | Class and Description |
|---|---|
private class |
FirstMixCipher.MixEncryptionHandler |
| Modifier and Type | Field and Description |
|---|---|
private ISymCipher |
m_channelSymCipher |
private boolean |
m_firstEncryptionPacket |
private ISymCipher |
m_mixCipher |
| Constructor and Description |
|---|
FirstMixCipher(ISymCipher a_mixCipher,
ISymCipher a_channelSymCipher) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
decrypt(byte[] a_packet)
Decrypts the given byte array and saves the result in place.
|
byte[] |
encrypt(byte[] a_packet,
int a_virtualPacketLength,
java.util.Vector a_sendCallbackHandlers)
Encrypts a byte array using the underlying encryption algorithm for that
mix.
|
int |
getNextPacketEncryptionOverhead()
Returns the overhead an encryption operation with this mix brings with it.
|
private boolean m_firstEncryptionPacket
private ISymCipher m_mixCipher
private ISymCipher m_channelSymCipher
public FirstMixCipher(ISymCipher a_mixCipher, ISymCipher a_channelSymCipher)
public byte[] encrypt(byte[] a_packet,
int a_virtualPacketLength,
java.util.Vector a_sendCallbackHandlers)
IMixCipherencrypt in interface IMixCiphera_packet - The byte array to be encrypted.a_virtualPacketLength - The minimal length of the resulting packet.public boolean decrypt(byte[] a_packet)
IMixCipherdecrypt in interface IMixCipherpublic int getNextPacketEncryptionOverhead()
IMixCiphergetNextPacketEncryptionOverhead in interface IMixCipherCopyright © 2023. All rights reserved.