use macros to hide abstraction
authorJohn Kohl <jtkohl@mit.edu>
Thu, 20 Sep 1990 15:58:41 +0000 (15:58 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 20 Sep 1990 15:58:41 +0000 (15:58 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1140 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/des/destest.c
src/lib/crypto/des/verify.c

index c6ca97d4c35e129aef94081a9b1298d16f098480..e85e4823d2b251b215a042e925b12e8b543e4b49 100644 (file)
@@ -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);
         }
index 84ab6a7cea2a91b378e615cea6411ccd8944f821..cc50e92f1854dc0bfb07bbd346e6749810082493 100644 (file)
@@ -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);
     }