#include <cCipherBase.h>
|
| 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 | SetCipherKey (const void *pKeyData=nullptr, size_t nKeySize=0) |
|
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 HRESULT | Cipher (BYTE *pOutput, const BYTE *pInput, size_t nSize) override |
|
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) |
|
Abstract Base class for all block cipher crypt algorithms. State information.
- Note
- Some algorithms may have min/max key sizes. (get_BlockAlignSize())
-
State information can not always be shared with encrypt and decrypt sides of the same channel ! Base for: cCipherAES, cCipherBlowfish, cCipherCamellia, cCipherDES, cCipherRC4 Base for wrappers cCipherCCM and cCipherGCM. Defined by cCipherTypeDef
◆ cCipherBase()
◆ ~cCipherBase()
virtual GrayLib::cCipherBase::~cCipherBase |
( |
| ) |
|
|
inlinevirtual |
◆ Cipher()
virtual HRESULT GrayLib::cCipherBase::Cipher |
( |
BYTE * |
pOutput, |
|
|
const BYTE * |
pInput, |
|
|
size_t |
nSize |
|
) |
| |
|
inlineoverridevirtual |
◆ CipherModeCBC()
virtual HRESULT GrayLib::cCipherBase::CipherModeCBC |
( |
BYTE * |
pOutput, |
|
|
const BYTE * |
pInput, |
|
|
size_t |
nSize, |
|
|
BYTE * |
pIV |
|
) |
| |
|
inlinevirtual |
◆ CipherModeCFB()
virtual HRESULT GrayLib::cCipherBase::CipherModeCFB |
( |
BYTE * |
pOutput, |
|
|
const BYTE * |
pInput, |
|
|
size_t |
nSize, |
|
|
BYTE * |
pIV, |
|
|
size_t * |
pIVOffset |
|
) |
| |
|
inlinevirtual |
◆ CipherModeCTR()
virtual HRESULT GrayLib::cCipherBase::CipherModeCTR |
( |
BYTE * |
pOutput, |
|
|
const BYTE * |
pInput, |
|
|
size_t |
nSize, |
|
|
BYTE * |
pNonceCounter, |
|
|
size_t * |
pNCOffset, |
|
|
BYTE * |
pStreamBlock |
|
) |
| |
|
inlinevirtual |
◆ CipherModeECB()
virtual HRESULT GrayLib::cCipherBase::CipherModeECB |
( |
BYTE * |
pOutput, |
|
|
const BYTE * |
pInput |
|
) |
| |
|
inlinevirtual |
◆ CopyFillX()
size_t GRAYCALL GrayLib::cCipherBase::CopyFillX |
( |
void * |
pOutput, |
|
|
size_t |
nOutSize, |
|
|
const void * |
pInput, |
|
|
size_t |
nInputSize |
|
) |
| |
|
static |
Used to copy a crypt key. Maybe be bigger than native key size (wrap XOR). else Fill any extra space by just duping/repeating the key.
- Returns
- Smaller size of nOutSize and nInputSize.
◆ get_BlockAlignSize()
virtual size_t GrayLib::cCipherBase::get_BlockAlignSize |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ get_EncodeMode()
bool GrayLib::cCipherBase::get_EncodeMode |
( |
| ) |
const |
|
inlinenoexcept |
◆ put_BlockMode()
◆ put_EncodeMode()
void GrayLib::cCipherBase::put_EncodeMode |
( |
bool |
bEncodeMode | ) |
|
|
inlinenoexcept |
Are we crypt/encode or decrypt/decode mode ?
- Note
- we may need to call SetCipherKey again!
◆ SetCipherKey()
virtual HRESULT GrayLib::cCipherBase::SetCipherKey |
( |
const void * |
pKeyData = nullptr , |
|
|
size_t |
nKeySize = 0 |
|
) |
| |
|
inlinevirtual |
◆ m_bEncodeMode
bool GrayLib::cCipherBase::m_bEncodeMode |
|
protected |
We are in encode/encrypt mode vs decode/decrypt mode.
◆ m_eBlockMode
Cipher block mode. How are sequences of blocks treated?
The documentation for this class was generated from the following files: