Add functions des_set_key_checked, des_set_key_unchecked.

Never use des_set_key (it depends on the global variable des_check_key),
but usually des_set_key_unchecked.
Only destest.c bothered to look at the return values of des_set_key,
but it did not set des_check_key -- if it had done so,
most checks would have failed because of wrong parity and
because of weak keys.
This commit is contained in:
Bodo Möller
1999-12-03 20:24:21 +00:00
parent 21131f00d7
commit cddfe788fb
21 changed files with 106 additions and 103 deletions

View File

@@ -590,9 +590,9 @@ int MAIN(int argc, char **argv)
#endif
#ifndef NO_DES
des_set_key(&key,sch);
des_set_key(&key2,sch2);
des_set_key(&key3,sch3);
des_set_key_unchecked(&key,sch);
des_set_key_unchecked(&key2,sch2);
des_set_key_unchecked(&key3,sch3);
#endif
#ifndef NO_IDEA
idea_set_encrypt_key(key16,&idea_ks);