#include <Stream.hpp>

Metody publiczne | |
| XorCoder (Stream *a_Stream, char KeyByte) | |
| XorCoder (Stream *a_Stream, const void *KeyData, size_t KeyLength) | |
| XorCoder (Stream *a_Stream, const string &Key) | |
| virtual void | Write (const void *Data, size_t Size) |
| Zapisuje dane. | |
| virtual size_t | Read (void *Data, size_t Size) |
| Odczytuje dane. | |
| void | Reset () |
| Resetuje liczniki tak żeby kodowanie i dekodowanie odbywało się od początku klucza. | |
Statyczne metody publiczne | |
| static void | Code (void *Out, const void *Data, size_t DataLength, const void *Key, size_t KeyLength) |
| Po prostu przetwarza podane dane. | |
| static void | Code (string *Out, const string &Data, const string &Key) |
| Po prostu przetwarza podane dane. | |
| static void | Code (wstring *Out, const wstring &Data, const wstring &Key) |
| Po prostu przetwarza podane dane. | |
Mapuje bezpośrednio bajty na bajty strumienia do którego jest podłączony, nic nie buforuje, więc można operować też na strumieniu Stream.
| common::XorCoder::XorCoder | ( | Stream * | a_Stream, | |
| char | KeyByte | |||
| ) |
| common::XorCoder::XorCoder | ( | Stream * | a_Stream, | |
| const void * | KeyData, | |||
| size_t | KeyLength | |||
| ) |
| common::XorCoder::XorCoder | ( | Stream * | a_Stream, | |
| const string & | Key | |||
| ) |
| virtual void common::XorCoder::Write | ( | const void * | Data, | |
| size_t | Size | |||
| ) | [virtual] |
| virtual size_t common::XorCoder::Read | ( | void * | Data, | |
| size_t | MaxLength | |||
| ) | [virtual] |
Odczytuje dane.
Jeśli osiągnięto koniec, funkcja nie zwraca błędu, a liczba odczytanych bajtów to 0. (W oryginale: zgłasza błąd)
| Size | Liczba bajtów do odczytania |
Reimplementowana z common::Stream.
| void common::XorCoder::Reset | ( | ) | [inline] |
Resetuje liczniki tak żeby kodowanie i dekodowanie odbywało się od początku klucza.
| static void common::XorCoder::Code | ( | void * | Out, | |
| const void * | Data, | |||
| size_t | DataLength, | |||
| const void * | Key, | |||
| size_t | KeyLength | |||
| ) | [static] |
Po prostu przetwarza podane dane.
| static void common::XorCoder::Code | ( | string * | Out, | |
| const string & | Data, | |||
| const string & | Key | |||
| ) | [static] |
Po prostu przetwarza podane dane.
| static void common::XorCoder::Code | ( | wstring * | Out, | |
| const wstring & | Data, | |||
| const wstring & | Key | |||
| ) | [static] |
Po prostu przetwarza podane dane.
1.5.5