From 33b53c7f5cef4cf19770a38baa4b627f234322cf Mon Sep 17 00:00:00 2001 From: Giovanni Conte Date: Wed, 16 Jan 2019 12:09:43 +0100 Subject: removed longbow dependency Change-Id: I0c224b26261c7b24699410fc5e41ed6f3fab9815 Signed-off-by: Giovanni Conte --- libparc/parc/security/parc_CryptoHasher.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libparc/parc/security/parc_CryptoHasher.c') diff --git a/libparc/parc/security/parc_CryptoHasher.c b/libparc/parc/security/parc_CryptoHasher.c index f2c00967..a4d492ff 100755 --- a/libparc/parc/security/parc_CryptoHasher.c +++ b/libparc/parc/security/parc_CryptoHasher.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #ifdef __APPLE__ @@ -137,7 +137,7 @@ PARCCryptoHasher * parcCryptoHasher_Create(PARCCryptoHashType type) { PARCCryptoHasher *hasher = parcObject_CreateInstance(PARCCryptoHasher); - assertNotNull(hasher, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(PARCCryptoHasher)); + parcAssertNotNull(hasher, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(PARCCryptoHasher)); hasher->type = type; @@ -156,7 +156,7 @@ parcCryptoHasher_Create(PARCCryptoHashType type) default: parcMemory_Deallocate((void **) &hasher); - trapIllegalValue(type, "Unknown hasher type: %d", type); + parcTrapIllegalValue(type, "Unknown hasher type: %d", type); } hasher->hasher_ctx = hasher->functor.hasher_setup(hasher->functor.functor_env); @@ -167,7 +167,7 @@ PARCCryptoHasher * parcCryptoHasher_CustomHasher(PARCCryptoHashType type, PARCCryptoHasherInterface functor) { PARCCryptoHasher *hasher = parcObject_CreateInstance(PARCCryptoHasher); - assertNotNull(hasher, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(PARCCryptoHasher)); + parcAssertNotNull(hasher, "parcMemory_AllocateAndClear(%zu) returned NULL", sizeof(PARCCryptoHasher)); hasher->type = type; hasher->functor = functor; hasher->hasher_ctx = hasher->functor.hasher_setup(hasher->functor.functor_env); @@ -186,7 +186,7 @@ parcCryptoHasher_CustomHasher(PARCCryptoHashType type, PARCCryptoHasherInterface int parcCryptoHasher_Init(PARCCryptoHasher *digester) { - assertNotNull(digester, "Parameter must be non-null"); + parcAssertNotNull(digester, "Parameter must be non-null"); int success = digester->functor.hasher_init(digester->hasher_ctx); return (success == 1) ? 0 : -1; @@ -195,7 +195,7 @@ parcCryptoHasher_Init(PARCCryptoHasher *digester) int parcCryptoHasher_UpdateBytes(PARCCryptoHasher *digester, const void *buffer, size_t length) { - assertNotNull(digester, "Parameter must be non-null"); + parcAssertNotNull(digester, "Parameter must be non-null"); int success = digester->functor.hasher_update(digester->hasher_ctx, buffer, length); return (success == 1) ? 0 : -1; } @@ -203,7 +203,7 @@ parcCryptoHasher_UpdateBytes(PARCCryptoHasher *digester, const void *buffer, siz int parcCryptoHasher_UpdateBuffer(PARCCryptoHasher *digester, const PARCBuffer *buffer) { - assertNotNull(digester, "Parameter must be non-null"); + parcAssertNotNull(digester, "Parameter must be non-null"); PARCBuffer *buf = parcBuffer_Slice(buffer); size_t length = parcBuffer_Limit(buf); void *byteArray = parcBuffer_Overlay(buf, length); @@ -216,7 +216,7 @@ parcCryptoHasher_UpdateBuffer(PARCCryptoHasher *digester, const PARCBuffer *buff PARCCryptoHash * parcCryptoHasher_Finalize(PARCCryptoHasher *digester) { - assertNotNull(digester, "Parameter must be non-null"); + parcAssertNotNull(digester, "Parameter must be non-null"); PARCBuffer *digestBuffer = digester->functor.hasher_finalize(digester->hasher_ctx); if (parcBuffer_Position(digestBuffer) != 0) { @@ -486,7 +486,7 @@ static void * _crc32_create(void *env __attribute__ ((unused))) { _CRC32CState *ctx = parcMemory_AllocateAndClear(sizeof(_CRC32CState)); - assertNotNull(ctx, "parcMemory_AllocateAndClear(%zu) returned NULL for _CRC32CState", sizeof(_CRC32CState)); + parcAssertNotNull(ctx, "parcMemory_AllocateAndClear(%zu) returned NULL for _CRC32CState", sizeof(_CRC32CState)); // Now initialize it with our digest and key, so in hmac_init we can avoid using those return ctx; -- cgit 1.2.3-korg