From: John Kohl Date: Thu, 20 Sep 1990 15:58:41 +0000 (+0000) Subject: use macros to hide abstraction X-Git-Tag: krb5-1.0-alpha2~271 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e7c22540d69b281dcded439ee2a8719ffea76d0a;p=krb5.git use macros to hide abstraction git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1140 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/des/destest.c b/src/lib/crypto/des/destest.c index c6ca97d4c..e85e4823d 100644 --- a/src/lib/crypto/des/destest.c +++ b/src/lib/crypto/des/destest.c @@ -65,7 +65,7 @@ char *argv[]; convert(block2, input); convert(block3, output); - if (retval = (*eblock.crypto_entry->process_key)(&eblock,&keyblock)) { + if (retval = krb5_process_key(&eblock,&keyblock)) { com_err("des test", retval, "can't process key"); exit(-1); } @@ -81,7 +81,7 @@ char *argv[]; error++; } - if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) { + if (retval = krb5_finish_key(&eblock)) { com_err("des verify", retval, "can't finish key"); exit(-1); } diff --git a/src/lib/crypto/des/verify.c b/src/lib/crypto/des/verify.c index 84ab6a7ce..cc50e92f1 100644 --- a/src/lib/crypto/des/verify.c +++ b/src/lib/crypto/des/verify.c @@ -147,7 +147,7 @@ main(argc,argv) if (zflag) { input = zero_text; keyblock.contents = (krb5_octet *)zero_key; - if (retval = (*eblock.crypto_entry->process_key)(&eblock,&keyblock)) { + if (retval = krb5_process_key(&eblock,&keyblock)) { com_err("des verify", retval, "can't process zero key"); exit(-1); } @@ -158,7 +158,7 @@ main(argc,argv) printf("%02x ",cipher_text[j]); printf("\n"); do_decrypt(output,cipher_text); - if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) { + if (retval = krb5_finish_key(&eblock)) { com_err("des verify", retval, "can't finish zero key"); exit(-1); } @@ -168,7 +168,7 @@ main(argc,argv) if (mflag) { input = msb_text; keyblock.contents = (krb5_octet *)key3; - if (retval = (*eblock.crypto_entry->process_key)(&eblock,&keyblock)) { + if (retval = krb5_process_key(&eblock,&keyblock)) { com_err("des verify", retval, "can't process key3"); exit(-1); } @@ -181,7 +181,7 @@ main(argc,argv) } printf("\n"); do_decrypt(output,cipher_text); - if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) { + if (retval = krb5_finish_key(&eblock)) { com_err("des verify", retval, "can't finish key3"); exit(-1); } @@ -192,7 +192,7 @@ main(argc,argv) { input = zero_text; keyblock.contents = (krb5_octet *)key2; - if (retval = (*eblock.crypto_entry->process_key)(&eblock,&keyblock)) { + if (retval = krb5_process_key(&eblock,&keyblock)) { com_err("des verify", retval, "can't process key2"); exit(-1); } @@ -211,7 +211,7 @@ main(argc,argv) printf("%02x ",cipher_text[j]); printf("\n\n"); do_decrypt(output,cipher_text); - if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) { + if (retval = krb5_finish_key(&eblock)) { com_err("des verify", retval, "can't finish key2"); exit(-1); } @@ -226,7 +226,7 @@ main(argc,argv) /* ECB mode */ { keyblock.contents = (krb5_octet *)default_key; - if (retval = (*eblock.crypto_entry->process_key)(&eblock,&keyblock)) { + if (retval = krb5_process_key(&eblock,&keyblock)) { com_err("des verify", retval, "can't process key2"); exit(-1); } @@ -305,7 +305,7 @@ main(argc,argv) for (j = 0; j<=7; j++) printf("%02x ",cipher_text[j]); printf("\n\n"); - if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) { + if (retval = krb5_finish_key(&eblock)) { com_err("des verify", retval, "can't finish key2"); exit(-1); }