hash: enumerate hash algorithms

Identify the algorithms with an enum instead of string.
This commit is contained in:
Miroslav Lichvar
2020-05-13 12:51:41 +02:00
parent a0d2513be6
commit a8c8f2f309
10 changed files with 119 additions and 60 deletions

View File

@@ -2990,7 +2990,7 @@ process_cmd_keygen(char *line)
cmac_length = 0;
#endif
if (HSH_GetHashId(type) >= 0) {
if (HSH_GetHashId(UTI_HashNameToAlgorithm(type)) >= 0) {
length = (bits + 7) / 8;
} else if (cmac_length > 0) {
length = cmac_length;