Skip to content

Commit

Permalink
Suppress MSVC compiler warnings (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyk4j authored Aug 19, 2024
1 parent a860cae commit 601a6be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions c/wsgup/include/main.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#ifndef MAIN_H
#define MAIN_H

#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif

#define NONCE_LENGTH 12
#define TAG_LENGTH 16

Expand Down
4 changes: 2 additions & 2 deletions c/wsgup/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int main(char* argc, char** argv){

int userid_length = ccm_decrypt(
enc_userid_bin, // unsigned char *ciphertext,
strlen(enc_userid) / 2, // int ciphertext_len,
(int) strlen(enc_userid) / 2, // int ciphertext_len,
NULL, // unsigned char *aad,
0, // int aad_len,
tag_userid_bin, // unsigned char *tag,
Expand Down Expand Up @@ -153,7 +153,7 @@ int main(char* argc, char** argv){

int password_length = ccm_decrypt(
enc_password_bin, // unsigned char *ciphertext,
strlen(enc_password) / 2, // int ciphertext_len,
(int) strlen(enc_password) / 2, // int ciphertext_len,
NULL, // unsigned char *aad,
0, // int aad_len,
tag_password_bin, // unsigned char *tag,
Expand Down

0 comments on commit 601a6be

Please sign in to comment.