sfEncryptor Class Reference

#include <Encryptor.hpp>

List of all members.

Public Member Functions

bool Encrypt (const char *Source, std::size_t Size, const char *Key)
bool Decrypt (const char *Source, std::size_t Size, const char *Key)
const char * GetData () const
std::size_t GetDataSize () const


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.

References GetData().

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.

References GetData().

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.

Referenced by Decrypt(), and Encrypt().

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:
Generated for SFML by  doxygen 1.5.2