mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:45:07 -05:00
hash: enumerate hash algorithms
Identify the algorithms with an enum instead of string.
This commit is contained in:
@@ -36,10 +36,10 @@
|
||||
static MD5_CTX ctx;
|
||||
|
||||
int
|
||||
HSH_GetHashId(const char *name)
|
||||
HSH_GetHashId(HSH_Algorithm algorithm)
|
||||
{
|
||||
/* only MD5 is supported */
|
||||
if (strcmp(name, "MD5"))
|
||||
if (algorithm != HSH_MD5)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user