#include <cCipherRC4.h>
|
| cCipherRC4 (bool bEncodeMode=true) |
|
| cCipherRC4 (bool bEncodeMode, const void *pKeyData, size_t nKeySize) |
|
virtual | ~cCipherRC4 (void) |
|
virtual HRESULT | SetCipherKey (const void *pKeyData=nullptr, size_t nKeySize=0) override |
|
virtual HRESULT | Cipher (BYTE *pOutput, const BYTE *pInput, size_t nSizeBytes) override |
| Bi directional / symmetrical crypt and decrypt. More...
|
|
| UNITTEST_FRIEND (cCipherRC4) |
|
| cCipherBase (bool bEncodeMode=true, CIPHER_BLOCK_TYPE eBlockMode=CIPHER_BLOCK_UNK) noexcept |
|
virtual | ~cCipherBase () |
|
void | put_EncodeMode (bool bEncodeMode) noexcept |
|
bool | get_EncodeMode () const noexcept |
|
void | put_BlockMode (CIPHER_BLOCK_TYPE eBlockMode) noexcept |
|
virtual size_t | get_BlockAlignSize () const override |
|
virtual HRESULT | CipherModeECB (BYTE *pOutput, const BYTE *pInput) |
|
virtual HRESULT | CipherModeCBC (BYTE *pOutput, const BYTE *pInput, size_t nSize, BYTE *pIV) |
|
virtual HRESULT | CipherModeCFB (BYTE *pOutput, const BYTE *pInput, size_t nSize, BYTE *pIV, size_t *pIVOffset) |
|
virtual HRESULT | CipherModeCTR (BYTE *pOutput, const BYTE *pInput, size_t nSize, BYTE *pNonceCounter, size_t *pNCOffset, BYTE *pStreamBlock) |
|
virtual | ~CObject () |
|
virtual bool | isValidCheck () const noexcept |
| < memory allocation and structure definitions are valid. More...
|
|
virtual void | AssertValid () const |
| < memory allocation and structure definitions are valid. More...
|
|
virtual void | Serialize (cArchive &a) |
|
|
static size_t GRAYCALL | CopyFillX (void *pOutput, size_t nOutSize, const void *pInput, size_t nInputSize) |
|
Compatible with RSA RC4 AKA ARC4 used in Secure Sockets Layer (SSL) and WEP. Declared NOT safe in 2015. Not as good as Blowfish but has no BlockAlignSize. http://groups.google.com/group/sci.crypt/msg/10a300c9d21afca0
◆ cCipherRC4() [1/2]
GrayLib::cCipherRC4::cCipherRC4 |
( |
bool |
bEncodeMode = true | ) |
|
◆ cCipherRC4() [2/2]
GrayLib::cCipherRC4::cCipherRC4 |
( |
bool |
bEncodeMode, |
|
|
const void * |
pKeyData, |
|
|
size_t |
nKeySize |
|
) |
| |
◆ ~cCipherRC4()
GrayLib::cCipherRC4::~cCipherRC4 |
( |
void |
| ) |
|
|
virtual |
◆ Cipher()
HRESULT GrayLib::cCipherRC4::Cipher |
( |
BYTE * |
pOutput, |
|
|
const BYTE * |
pInput, |
|
|
size_t |
nSizeBytes |
|
) |
| |
|
overridevirtual |
Bi directional / symmetrical crypt and decrypt.
Symmetrical crypt and decrypt.
- pOutput = buffer for the output data
- pInput = buffer holding the input data
- nSize = length of the input data
- Returns
- Amount of data i could process. <0 = error.
Reimplemented from GrayLib::cCipherBase.
◆ SetCipherKey()
HRESULT GrayLib::cCipherRC4::SetCipherKey |
( |
const void * |
pKeyData = nullptr , |
|
|
size_t |
nKeySize = 0 |
|
) |
| |
|
overridevirtual |
create a fairly simple key based SBox. key schedule.
- pKeyData = set cipher key. Fix it if unaligned.
- nKeySize = length of the key, in bytes
Reimplemented from GrayLib::cCipherBase.
◆ UNITTEST_FRIEND()
GrayLib::cCipherRC4::UNITTEST_FRIEND |
( |
cCipherRC4 |
| ) |
|
◆ m_Sbox
BYTE GrayLib::cCipherRC4::m_Sbox[256] |
|
protected |
◆ m_x
int GrayLib::cCipherRC4::m_x |
|
protected |
◆ m_y
int GrayLib::cCipherRC4::m_y |
|
protected |
The documentation for this class was generated from the following files: