#include "base/util/utils.h"
#include "spds/DESDecoder.h"
+#include "base/globalsdef.h"
+
+USE_NAMESPACE
DESDecoder::DESDecoder() : DataTransformer(DT_DES) {
/*
TODO: implement this using openssl
- BOOL res;
+ bool res;
HCRYPTPROV prov = 0;
HCRYPTKEY key = 0;
CRYPT_VERIFYCONTEXT
);
- if (res == FALSE) {
+ if (res == false) {
lastErrorCode = ERR_DT_FAILURE;
sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
&hash // handle to the hash object
);
- if (res == FALSE) {
+ if (res == false) {
lastErrorCode = ERR_DT_FAILURE;
sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
0 // flags not used
);
- if (res == FALSE) {
+ if (res == false) {
lastErrorCode = ERR_DT_FAILURE;
sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
&key
);
- if (res == FALSE) {
+ if (res == false) {
lastErrorCode = ERR_DT_FAILURE;
sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
0 // flags not used
);
- if (res == FALSE) {
+ if (res == false) {
lastErrorCode = ERR_DT_FAILURE;
sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
0 // flags not used
);
- if (res == FALSE) {
+ if (res == false) {
lastErrorCode = ERR_DT_FAILURE;
sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
res = CryptDecrypt (
key,
0,
- TRUE,
+ true,
0,
(unsigned char*)data,
&size
);
- if (res == FALSE) {
+ if (res == false) {
lastErrorCode = ERR_DT_FAILURE;
sprintf(lastErrorMsg, ERRMSG_DT_FAILURE, GetLastError());
goto exit;
}
info.size = size;
- info.newReturnedData = FALSE;
+ info.newReturnedData = false;
exit: