mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:55:07 -05:00
cmac: enumerate cipher algorithms
Identify the CMAC ciphers with an enum instead of string.
This commit is contained in:
12
util.c
12
util.c
@@ -927,6 +927,18 @@ UTI_FloatHostToNetwork(double x)
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
CMC_Algorithm
|
||||
UTI_CmacNameToAlgorithm(const char *name)
|
||||
{
|
||||
if (strcmp(name, "AES128") == 0)
|
||||
return CMC_AES128;
|
||||
else if (strcmp(name, "AES256") == 0)
|
||||
return CMC_AES256;
|
||||
return CMC_INVALID;
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
HSH_Algorithm
|
||||
UTI_HashNameToAlgorithm(const char *name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user