summaryrefslogtreecommitdiff
path: root/srcs/crypto_service.c
diff options
context:
space:
mode:
authorKyungwook Tak <k.tak@samsung.com>2016-07-15 11:52:13 +0900
committerKyungwook Tak <k.tak@samsung.com>2016-07-15 11:53:01 +0900
commit4ea2f0ebe530415109e408cb96f81cc0a0b6b3f7 (patch)
tree4308c9fd81955e079567979dc4c3a8f48f032c12 /srcs/crypto_service.c
parent6f18da83631e06509b2f14a729c7b6ac05aa4046 (diff)
downloadlibwebappenc-4ea2f0ebe530415109e408cb96f81cc0a0b6b3f7.tar.gz
libwebappenc-4ea2f0ebe530415109e408cb96f81cc0a0b6b3f7.tar.bz2
libwebappenc-4ea2f0ebe530415109e408cb96f81cc0a0b6b3f7.zip
Use stdbool instead of macro for boolean
Change-Id: I6d95a582cd8d2ec52adb314a167bd42dd386ac0b Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
Diffstat (limited to 'srcs/crypto_service.c')
-rw-r--r--srcs/crypto_service.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/srcs/crypto_service.c b/srcs/crypto_service.c
index eb1fc20..1c52cc5 100644
--- a/srcs/crypto_service.c
+++ b/srcs/crypto_service.c
@@ -19,7 +19,9 @@
* @version 1.0
* @brief provides encryption and decription operations.
*/
+#include "crypto_service.h"
+#include <stdbool.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
#include <openssl/crypto.h>
@@ -34,20 +36,17 @@
#define AES_256_KEY_SIZE 32
-#define WAE_FALSE 0
-#define WAE_TRUE 1
-
static unsigned char AES_CBC_IV[16] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
0x08, 0x39, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
-static int __initialized = WAE_FALSE;
+static bool __initialized = false;
void _initialize()
{
- if(__initialized != WAE_TRUE) {
+ if(!__initialized) {
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
- __initialized = WAE_TRUE;
+ __initialized = true;
}
}