prefix macros in tls_aes128

This commit is contained in:
Sergio R. Caprile committed 2024-03-06 11:59:12 -03:00
1 parent 05e55334fc
commit f26c713482
4 files changed
+28 -28

No files matched your search

+4 -4
View File
@@ -27,8 +27,8 @@
#define AES_DECRYPTION 1 // whether AES decryption is supported
/******************************************************************************/
#define ENCRYPT 1 // specify whether we're encrypting
#define DECRYPT 0 // or decrypting
#define MG_ENCRYPT 1 // specify whether we're encrypting
#define MG_DECRYPT 0 // or decrypting
#include "arch.h"
@@ -146,7 +146,7 @@ int gcm_setkey(gcm_context *ctx, // caller-provided context ptr
******************************************************************************/
int gcm_crypt_and_tag(
gcm_context *ctx, // gcm context with key already setup
int mode, // cipher direction: ENCRYPT (1) or DECRYPT (0)
int mode, // cipher direction: MG_ENCRYPT (1) or MG_DECRYPT (0)
const uchar *iv, // pointer to the 12-byte initialization vector
size_t iv_len, // byte length if the IV. should always be 12
const uchar *add, // pointer to the non-ciphered additional data
@@ -191,7 +191,7 @@ int gcm_auth_decrypt(
******************************************************************************/
int gcm_start(
gcm_context *ctx, // pointer to user-provided GCM context
int mode, // ENCRYPT (1) or DECRYPT (0)
int mode, // MG_ENCRYPT (1) or MG_DECRYPT (0)
const uchar *iv, // pointer to initialization vector
size_t iv_len, // IV length in bytes (should == 12)
const uchar *add, // pointer to additional AEAD data (NULL if none)