Mixes for Privacy and Anonymity in the Internet
Public Member Functions | List of all members
CASymCipherNull Class Reference

This class implemtns the symmetric channel cipher interface - but does not do eny encryption!. More...

Inheritance diagram for CASymCipherNull:
CASymChannelCipher CALockAble

Public Member Functions

 CASymCipherNull ()
 
 ~CASymCipherNull ()
 
bool isKeyValid ()
 
SINT32 setKey (const UINT8 *key)
 Sets the keys for crypt1() and crypt2() to the same key. More...
 
SINT32 setKeys (const UINT8 *key, UINT32 keysize)
 Sets the keys for crypt1() and crypt2() either to the same key (if keysize==KEY_SIZE) or to different values, if keysize==2* KEY_SIZE. More...
 
SINT32 setIVs (const UINT8 *p_iv)
 Sets iv1 and iv2 to p_iv. More...
 
SINT32 setIV2 (const UINT8 *p_iv)
 Sets iv2 to p_iv. More...
 
SINT32 crypt1 (const UINT8 *in, UINT8 *out, UINT32 len)
 
SINT32 crypt2 (const UINT8 *in, UINT8 *out, UINT32 len)
 
- Public Member Functions inherited from CALockAble
 CALockAble ()
 
virtual ~CALockAble ()
 
SINT32 lock ()
 Locks the lockable object by threadsafe incrementing a reference counter. More...
 
SINT32 unlock ()
 Unlocks the lockable object by threadsafe decrementing a reference counter. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CASymChannelCipher
static const UINT8 *const getAlgorithmName (SYMCHANNELCIPHER_ALGORITHM alg)
 
- Protected Member Functions inherited from CALockAble
SINT32 waitForDestroy ()
 If called checks if the reference counter equals zero. More...
 

Detailed Description

This class implemtns the symmetric channel cipher interface - but does not do eny encryption!.

Constructor & Destructor Documentation

◆ CASymCipherNull()

CASymCipherNull::CASymCipherNull ( )

◆ ~CASymCipherNull()

CASymCipherNull::~CASymCipherNull ( )

Member Function Documentation

◆ crypt1()

SINT32 CASymCipherNull::crypt1 ( const UINT8 in,
UINT8 out,
UINT32  len 
)
virtual

Implements CASymChannelCipher.

References E_SUCCESS, and len.

◆ crypt2()

SINT32 CASymCipherNull::crypt2 ( const UINT8 in,
UINT8 out,
UINT32  len 
)
virtual

Implements CASymChannelCipher.

References E_SUCCESS, and len.

◆ isKeyValid()

bool CASymCipherNull::isKeyValid ( )
virtual

Implements CASymChannelCipher.

◆ setIV2()

SINT32 CASymCipherNull::setIV2 ( const UINT8 p_iv)
virtual

Sets iv2 to p_iv.

Parameters
p_iv16 random bytes used for new iv2.
Return values
E_SUCCESS

Implements CASymChannelCipher.

References E_SUCCESS.

◆ setIVs()

SINT32 CASymCipherNull::setIVs ( const UINT8 p_iv)
virtual

Sets iv1 and iv2 to p_iv.

Parameters
p_iv16 random bytes used for new iv1 and iv2.
Return values
E_SUCCESS

Implements CASymChannelCipher.

References E_SUCCESS.

◆ setKey()

SINT32 CASymCipherNull::setKey ( const UINT8 key)
virtual

Sets the keys for crypt1() and crypt2() to the same key.

Implements CASymChannelCipher.

References E_SUCCESS.

◆ setKeys()

SINT32 CASymCipherNull::setKeys ( const UINT8 key,
UINT32  keysize 
)
virtual

Sets the keys for crypt1() and crypt2() either to the same key (if keysize==KEY_SIZE) or to different values, if keysize==2* KEY_SIZE.

Implements CASymChannelCipher.

References E_SUCCESS.