MCPcopy Create free account
hub / github.com/F-Stack/f-stack / partial_hash_sha3_224

Function partial_hash_sha3_224

dpdk/drivers/crypto/ccp/ccp_crypto.c:364–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364int partial_hash_sha3_224(uint8_t *data_in, uint8_t *data_out)
365{
366 sha3_context *ctx;
367 int i;
368
369 ctx = rte_zmalloc("sha3-ctx", sizeof(sha3_context), 0);
370 if (!ctx) {
371 CCP_LOG_ERR("sha3-ctx creation failed");
372 return -ENOMEM;
373 }
374 sha3_Init224(ctx);
375 sha3_Update(ctx, data_in, SHA3_224_BLOCK_SIZE);
376 for (i = 0; i < CCP_SHA3_CTX_SIZE; i++, data_out++)
377 *data_out = ctx->sb[CCP_SHA3_CTX_SIZE - i - 1];
378 rte_free(ctx);
379
380 return 0;
381}
382
383int partial_hash_sha3_256(uint8_t *data_in, uint8_t *data_out)
384{

Callers 1

generate_partial_hashFunction · 0.85

Calls 4

rte_zmallocFunction · 0.85
sha3_Init224Function · 0.85
sha3_UpdateFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected