Mixe 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...

#include <CASymCipherNull.hpp>

Inheritance diagram for CASymCipherNull:
Collaboration diagram for CASymCipherNull:

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!.

Definition at line 37 of file CASymCipherNull.hpp.

Constructor & Destructor Documentation

◆ CASymCipherNull()

CASymCipherNull::CASymCipherNull ( )
inline

Definition at line 41 of file CASymCipherNull.hpp.

42  {
43  }

◆ ~CASymCipherNull()

CASymCipherNull::~CASymCipherNull ( )
inline

Definition at line 45 of file CASymCipherNull.hpp.

46  {
47 #ifndef ONLY_LOCAL_PROXY
49 #endif
50  }
SINT32 waitForDestroy()
If called checks if the reference counter equals zero.
Definition: CALockAble.hpp:82

References CALockAble::waitForDestroy().

Here is the call graph for this function:

Member Function Documentation

◆ crypt1()

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

Implements CASymChannelCipher.

Definition at line 88 of file CASymCipherNull.hpp.

89  {
90  memmove(out, in, len);
91  return E_SUCCESS;
92  }
const SINT32 E_SUCCESS
Definition: errorcodes.hpp:2
UINT16 len
Definition: typedefs.hpp:0

References E_SUCCESS, and len.

◆ crypt2()

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

Implements CASymChannelCipher.

Definition at line 94 of file CASymCipherNull.hpp.

95  {
96  memmove(out, in, len);
97  return E_SUCCESS;
98  }

References E_SUCCESS, and len.

◆ isKeyValid()

bool CASymCipherNull::isKeyValid ( )
inlinevirtual

Implements CASymChannelCipher.

Definition at line 51 of file CASymCipherNull.hpp.

52  {
53  return true;
54  }

◆ setIV2()

SINT32 CASymCipherNull::setIV2 ( const UINT8 p_iv)
inlinevirtual

Sets iv2 to p_iv.

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

Implements CASymChannelCipher.

Definition at line 83 of file CASymCipherNull.hpp.

84  {
85  return E_SUCCESS;
86  }

References E_SUCCESS.

◆ setIVs()

SINT32 CASymCipherNull::setIVs ( const UINT8 p_iv)
inlinevirtual

Sets iv1 and iv2 to p_iv.

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

Implements CASymChannelCipher.

Definition at line 74 of file CASymCipherNull.hpp.

75  {
76  return E_SUCCESS;
77  }

References E_SUCCESS.

◆ setKey()

SINT32 CASymCipherNull::setKey ( const UINT8 key)
inlinevirtual

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

Implements CASymChannelCipher.

Definition at line 57 of file CASymCipherNull.hpp.

58  {
59  return E_SUCCESS;
60  }

References E_SUCCESS.

◆ setKeys()

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

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.

Definition at line 64 of file CASymCipherNull.hpp.

65  {
66  return E_SUCCESS;
67  }

References E_SUCCESS.


The documentation for this class was generated from the following file: