![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cCipherText.h>
Public Member Functions | |
cCipherText (cCipherBase *pCipher) | |
~cCipherText () | |
HRESULT | EncryptText (const void *pszSrc, size_t nSrcSize, char *pszDst, StrLen_t iDstMaxLen) const |
HRESULT | DecryptText (const char *pszSrc, StrLen_t nSrcSize, void *pszDst, size_t iDstMaxLen) const |
cStringA | EncryptText (const char *pszSrc, StrLen_t nSrcSize=-1) const |
cStringA | DecryptText (const char *pszSrc, StrLen_t nSrcSize=-1) const |
UNITTEST_FRIEND (cCipherText) | |
helper class to encrypt binary data to cBase64 coded string. allow decrypt of same cBase64 string back to binary raw data. i.e. the encrypted result is a string. using any cCipherBase based algorithm
GrayLib::cCipherText::cCipherText | ( | cCipherBase * | pCipher | ) |
GrayLib::cCipherText::~cCipherText | ( | ) |
HRESULT GrayLib::cCipherText::DecryptText | ( | const char * | pszSrc, |
StrLen_t | nSrcSize, | ||
void * | pszDst, | ||
size_t | iDstMaxLen | ||
) | const |
Take uucoded and encrypted data and un-uucode then decrypt it to original binary data. might be text results of course.
We just assume the decrypted thing is text. it might not be ? nSrcLen = -1 = until '\0'
HRESULT GrayLib::cCipherText::EncryptText | ( | const void * | pszSrc, |
size_t | nSrcSize, | ||
char * | pszDst, | ||
StrLen_t | iDstMaxLen | ||
) | const |
Encrypt original binary data then return the result as cBase64 text. pSrc does not have to be text. can be binary.
GrayLib::cCipherText::UNITTEST_FRIEND | ( | cCipherText | ) |