sfEncryptor Class Reference

sfEncryptor provides encryption and decryption of data using the Rijndael algorithm (the AES version -- with 128 bits keys and blocks) More...

#include <Encryptor.hpp>

List of all members.


Public Member Functions

bool Encrypt (const char *Source, std::size_t Size, const char *Key)
 Encrypt the specified data.
bool Decrypt (const char *Source, std::size_t Size, const char *Key)
 Decrypt the specified data.
const char * GetData () const
 Get the data after encryption or decryption (size is given by GetDataSize()).
std::size_t GetDataSize () const
 Tell the size of the encrypted / decrypted data (data is given by GetData()).

Detailed Description

sfEncryptor provides encryption and decryption of data using the Rijndael algorithm (the AES version -- with 128 bits keys and blocks)

Definition at line 41 of file Encryptor.hpp.


Member Function Documentation

bool sfEncryptor::Encrypt ( const char *  Source,
std::size_t  Size,
const char *  Key 
)

Encrypt the specified data.

Parameters:
Source : Pointer to the data to encrypt
Size : Size of the data to encrypt, in bytes (must be a multiple of 16)
Key : Key (must be 16 characters (128 bits) long)
Returns:
True on success

Definition at line 729 of file Encryptor.cpp.

bool sfEncryptor::Decrypt ( const char *  Source,
std::size_t  Size,
const char *  Key 
)

Decrypt the specified data.

Parameters:
Source : Pointer to the data to decrypt
Size : Size of the data to decrypt, in bytes (must be a multiple of 16)
Key : Key (must be 16 characters (128 bits) long)
Returns:
True on success

Definition at line 784 of file Encryptor.cpp.

const char * sfEncryptor::GetData (  )  const

Get the data after encryption or decryption (size is given by GetDataSize()).

This pointer is valid until the next call to Encrypt or Decrypt

Returns:
Const pointer to the data

Definition at line 841 of file Encryptor.cpp.

std::size_t sfEncryptor::GetDataSize (  )  const

Tell the size of the encrypted / decrypted data (data is given by GetData()).

Returns:
Size of data, in bytes

Definition at line 851 of file Encryptor.cpp.


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