12 #ifndef _OsEncryption_h_ 13 #define _OsEncryption_h_ 20 #if defined (OSENCRYPTION) 21 #include <openssl/evp.h> 22 #include <openssl/x509.h> 35 #define OE_MAX_KEY_LEN 64 37 #define OE_MAX_RESULTS_HEADER_LEN 32 83 void setKey(
const unsigned char *key,
int keyLen);
118 #if defined (OSENCRYPTION) 119 X509_ALGOR *mAlgorithm;
121 EVP_CIPHER_CTX mContext;
124 unsigned char *mSalt;
132 unsigned char *mData;
136 unsigned char *mResults;
148 #endif // _OsEncryption_h_ void setResultsHeader(const unsigned char *header, int headerLen)
If you want to prepend this to the results header for file identification purposes.
Definition: OsEncryption.cpp:110
void setKey(const unsigned char *key, int keyLen)
set secret password
Definition: OsEncryption.cpp:101
int getDataLen(void)
How large is the untouched data buffer.
Definition: OsEncryption.cpp:123
int getResultsLen(void)
After [en/de]crypting get your results here.
Definition: OsEncryption.cpp:139
Wrapper and helper around system encryption routines.
Definition: OsEncryption.h:56
#define OE_MAX_RESULTS_HEADER_LEN
Definition: OsEncryption.h:37
unsigned char * getResults(void)
After [en/de]crypting, here's your results.
Definition: OsEncryption.cpp:134
OsEncryption(void)
Create one for each encryption/decryption operation.
Definition: OsEncryption.cpp:76
virtual ~OsEncryption(void)
Definition: OsEncryption.cpp:95
Definition: OsEncryption.h:102
#define OE_MAX_KEY_LEN
Definition: OsEncryption.h:35
OsStatus
Definition: OsStatus.h:27
OsStatus release(void)
free all, called in descructor
Definition: OsEncryption.cpp:155
Definition: OsEncryption.h:103
OsStatus decrypt(void)
operate after setting approp. input. . NOTE: This will return OS_FAILED on vxworks. */
Definition: OsEncryption.cpp:144
unsigned char * getDataPointer(void)
Pointer to untouched data buffer.
Definition: OsEncryption.cpp:128
UtlBoolean openSslError(void)
common handling of OpenSSL's errors
Definition: OsEncryption.cpp:299
OsStatus init(Direction direction)
allocate OpenSSL stuff
Definition: OsEncryption.cpp:181
Direction
OpenSSL state differentation direction for API calls.
Definition: OsEncryption.h:100
int UtlBoolean
Definition: UtlDefs.h:41
void setDataPointer(unsigned char *pIn, int inLen)
Data to feed to encryption, not touched and NOT copied, so keep it around.
Definition: OsEncryption.cpp:117
OsStatus crypto(Direction direction)
common [en/de]crypt method
Definition: OsEncryption.cpp:235
static UtlBoolean sIgnoreEncryption
DEBUG turn on/off.
Definition: OsEncryption.h:95
OsStatus encrypt(void)
operate after setting approp. input. NOTE: This will return OS_FAILED on vxworks. */ ...
Definition: OsEncryption.cpp:149