anon.client.crypto
Class ControlChannelCipher
java.lang.Object
anon.client.crypto.ControlChannelCipher
public class ControlChannelCipher
- extends java.lang.Object
Method Summary |
private byte[] |
createIV(long counter)
|
void |
decryptGCM2(byte[] from,
int ifrom,
byte[] to,
int ito,
int len)
|
void |
encryptGCM1(byte[] from,
int ifrom,
byte[] to,
int ito,
int len)
|
int |
getDecryptedOutputSize(int enclength)
|
int |
getEncryptedOutputSize(int inputlength)
|
int |
setRecvKey(byte[] key,
int offset,
int len)
|
int |
setSentKey(byte[] key,
int offset,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_sentEngine
org.bouncycastle.crypto.modes.GCMBlockCipher m_sentEngine
m_recvEngine
org.bouncycastle.crypto.modes.GCMBlockCipher m_recvEngine
m_EncMsgCounter
long m_EncMsgCounter
m_DecMsgCounter
long m_DecMsgCounter
m_sentKey
byte[] m_sentKey
m_recvKey
byte[] m_recvKey
ControlChannelCipher
public ControlChannelCipher()
setSentKey
public int setSentKey(byte[] key,
int offset,
int len)
setRecvKey
public int setRecvKey(byte[] key,
int offset,
int len)
createIV
private byte[] createIV(long counter)
encryptGCM1
public void encryptGCM1(byte[] from,
int ifrom,
byte[] to,
int ito,
int len)
throws java.lang.Exception
- Throws:
java.lang.Exception
decryptGCM2
public void decryptGCM2(byte[] from,
int ifrom,
byte[] to,
int ito,
int len)
throws java.lang.Exception
- Throws:
java.lang.Exception
getEncryptedOutputSize
public int getEncryptedOutputSize(int inputlength)
getDecryptedOutputSize
public int getDecryptedOutputSize(int enclength)