GeCipher256 Class Reference

#include <c4d_tools.h>

Detailed Description

A class that encrypts data using an insecure scrambling.

Public Member Functions

 GeCipher256 ()
 
 ~GeCipher256 ()
 
Bool Open (const void *key, Int32 klength, Bool stream)
 
void Close ()
 
void Encrypt (void *mem, Int32 size)
 
void Decrypt (void *mem, Int32 size)
 

Private Attributes

void * hnd
 

Constructor & Destructor Documentation

◆ GeCipher256()

Constructor.

◆ ~GeCipher256()

Destructor.

Member Function Documentation

◆ Open()

Bool Open ( const void *  key,
Int32  klength,
Bool  stream 
)

Initializes the cipher engine with the specified key.

Parameters
[in]keyKey array.
[in]klengthKey length. Must be >1.
[in]streamIf true the encryption/decryption sequence has to take place in the exact same order, otherwise it will not work.
If false all bytes are encrypted/decrypted independently.
Returns
true if successful, otherwise false.

◆ Close()

void Close ( )

Closes the cipher engine.

◆ Encrypt()

void Encrypt ( void *  mem,
Int32  size 
)

Encrypts an array.

Parameters
[in]memThe array to encrypt.
[in]sizeThe size of the array.

◆ Decrypt()

void Decrypt ( void *  mem,
Int32  size 
)

Decrypts an array.

Parameters
[in]memThe array to decrypt.
[in]sizeThe size of the array.

Member Data Documentation

◆ hnd

void* hnd
private