Fix several constraints of raw modes

This commit is contained in:
jsteube
2019-02-16 13:37:17 +01:00
parent eb0e8eed2a
commit ba803a79ae
25 changed files with 63 additions and 45 deletions
+2 -2
View File
@@ -67,8 +67,8 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
token.attr[0] = TOKEN_ATTR_FIXED_LENGTH
| TOKEN_ATTR_VERIFY_SIGNATURE;
token.len_min[1] = 28;
token.len_max[1] = 368; // 368 = 20 + 256 where 20 is digest length and 256 is SALT_MAX
token.len_min[1] = ((20 + SALT_MIN) * 8) / 6;
token.len_max[1] = ((20 + SALT_MAX) * 8) / 6;
token.attr[1] = TOKEN_ATTR_VERIFY_LENGTH
| TOKEN_ATTR_VERIFY_BASE64A;