From 8b17dcdcfe6a5468aea4e540fac6abea76b4abfa Mon Sep 17 00:00:00 2001 From: wuriyanto Date: Thu, 31 Aug 2023 11:43:32 +0700 Subject: [PATCH] fix code identation --- crypsi.h | 5 +++-- crypsi_mysqludf.c | 44 ++++++++++++++++++++++---------------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/crypsi.h b/crypsi.h index 3171097..9e33841 100644 --- a/crypsi.h +++ b/crypsi.h @@ -649,8 +649,9 @@ static int crypsi_aes_gcm_encrypt(enum crypsi_aes_key aes_key_size, const unsign return ret; } - if((dst_tmp_raw = (unsigned char*) malloc(raw_ciphertext_len)) == NULL) - return -1; + if((dst_tmp_raw = (unsigned char*) malloc(raw_ciphertext_len)) == NULL) { + return -1; + } if(!(ctx = EVP_CIPHER_CTX_new())) { goto cleanup; diff --git a/crypsi_mysqludf.c b/crypsi_mysqludf.c index b724285..e00ed05 100644 --- a/crypsi_mysqludf.c +++ b/crypsi_mysqludf.c @@ -160,8 +160,8 @@ char* mcrypsi_aes_128_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result ret = crypsi_aes_128_gcm_encrypt(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error encrypt with mcrypsi_aes_128_gcm_encrypt"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -204,8 +204,8 @@ char* mcrypsi_aes_128_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result ret = crypsi_aes_128_gcm_decrypt(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error encrypt with mcrypsi_aes_128_gcm_decrypt"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -248,8 +248,8 @@ char* mcrypsi_aes_192_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result ret = crypsi_aes_192_gcm_encrypt(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error encrypt with mcrypsi_aes_192_gcm_encrypt"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -292,8 +292,8 @@ char* mcrypsi_aes_192_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result ret = crypsi_aes_192_gcm_decrypt(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error encrypt with mcrypsi_aes_192_gcm_decrypt"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -336,8 +336,8 @@ char* mcrypsi_aes_256_gcm_encrypt(UDF_INIT* initid, UDF_ARGS* args, char* result ret = crypsi_aes_256_gcm_encrypt(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error encrypt with mcrypsi_aes_256_gcm_encrypt"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -380,8 +380,8 @@ char* mcrypsi_aes_256_gcm_decrypt(UDF_INIT* initid, UDF_ARGS* args, char* result ret = crypsi_aes_256_gcm_decrypt(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error encrypt with mcrypsi_aes_256_gcm_decrypt"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -424,8 +424,8 @@ char* mcrypsi_hmac_md5(UDF_INIT* initid, UDF_ARGS* args, char* result, ret = crypsi_hmac_md5(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error execute mcrypsi_hmac_md5"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -468,8 +468,8 @@ char* mcrypsi_hmac_sha1(UDF_INIT* initid, UDF_ARGS* args, char* result, ret = crypsi_hmac_sha1(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error execute mcrypsi_hmac_sha1"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -512,8 +512,8 @@ char* mcrypsi_hmac_sha256(UDF_INIT* initid, UDF_ARGS* args, char* result, ret = crypsi_hmac_sha256(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error execute mcrypsi_hmac_sha256"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -556,8 +556,8 @@ char* mcrypsi_hmac_sha384(UDF_INIT* initid, UDF_ARGS* args, char* result, ret = crypsi_hmac_sha384(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error execute mcrypsi_hmac_sha384"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size; @@ -600,8 +600,8 @@ char* mcrypsi_hmac_sha512(UDF_INIT* initid, UDF_ARGS* args, char* result, ret = crypsi_hmac_sha512(input_key, input_text, text_size, &dst, &dst_size); if (ret != 0) { strcpy(error, "error execute mcrypsi_hmac_sha512"); - *is_null = 1; - return NULL; + *is_null = 1; + return NULL; } *length = dst_size;