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

Function algo_select

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

Source from the content-addressed store, hash-verified

1390}
1391
1392static uint8_t
1393algo_select(int sessalgo,
1394 const EVP_MD **algo)
1395{
1396 int res = 0;
1397
1398 switch (sessalgo) {
1399 case CCP_AUTH_ALGO_MD5_HMAC:
1400 *algo = EVP_md5();
1401 break;
1402 case CCP_AUTH_ALGO_SHA1_HMAC:
1403 *algo = EVP_sha1();
1404 break;
1405 case CCP_AUTH_ALGO_SHA224_HMAC:
1406 *algo = EVP_sha224();
1407 break;
1408 case CCP_AUTH_ALGO_SHA256_HMAC:
1409 *algo = EVP_sha256();
1410 break;
1411 case CCP_AUTH_ALGO_SHA384_HMAC:
1412 *algo = EVP_sha384();
1413 break;
1414 case CCP_AUTH_ALGO_SHA512_HMAC:
1415 *algo = EVP_sha512();
1416 break;
1417 default:
1418 res = -EINVAL;
1419 break;
1420 }
1421 return res;
1422}
1423
1424static int
1425process_cpu_auth_hmac(uint8_t *src, uint8_t *dst,

Callers 1

cpu_crypto_authFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected