From d09c6c1bd5da3e2d79351daeba304ca99976a726 Mon Sep 17 00:00:00 2001 From: vnugent Date: Thu, 18 Apr 2024 00:28:51 -0400 Subject: refactor!: Pushing what I have to dev --- tests/hex.h | 10 ++-------- tests/test.c | 6 +++--- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/hex.h b/tests/hex.h index 7c8080a..3348028 100644 --- a/tests/hex.h +++ b/tests/hex.h @@ -15,7 +15,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License -* along with NativeHeapApi. If not, see http://www.gnu.org/licenses/. +* along with noscrypt. If not, see http://www.gnu.org/licenses/. */ @@ -26,13 +26,7 @@ #include #include -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L - #include - #define STATIC_ASSERT(x, m) static_assert(x, m) -#else - #define STATIC_ASSERT(x, m) - #pragma message("Static assertions are not supported by this language version") -#endif +#include "../src/internal/nc-util.h" typedef struct hexBytes { diff --git a/tests/test.c b/tests/test.c index 8d3e115..fe7659c 100644 --- a/tests/test.c +++ b/tests/test.c @@ -15,7 +15,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License -* along with NativeHeapApi. If not, see http://www.gnu.org/licenses/. +* along with noscrypt. If not, see http://www.gnu.org/licenses/. */ #include @@ -280,7 +280,7 @@ static int TestPublicApiArgumentValidation(void) uint8_t hmacKeyOut[NC_HMAC_KEY_SIZE]; uint8_t nonce[NC_ENCRYPTION_NONCE_SIZE]; - NCCryptoData cryptoData; + NCEncryptionArgs cryptoData; cryptoData.dataSize = sizeof(zero32); cryptoData.inputData = zero32; cryptoData.outputData = sig64; /*just an arbitrary writeable buffer*/ @@ -467,7 +467,7 @@ static int TestCorrectEncryption(NCContext* context) uint8_t cipherText[TEST_ENC_DATA_SIZE]; uint8_t decryptedText[TEST_ENC_DATA_SIZE]; - NCCryptoData cryptoData; + NCEncryptionArgs cryptoData; NCMacVerifyArgs macVerifyArgs; /* setup the crypto data structure */ -- cgit