comparison ecb_decrypt.c @ 15:6362d3854bb4 libtomcrypt-orig

0.96 release of LibTomCrypt
author Matt Johnston <matt@ucc.asn.au>
date Tue, 15 Jun 2004 14:07:21 +0000
parents 7faae8f46238
children
comparison
equal deleted inserted replaced
3:7faae8f46238 15:6362d3854bb4
17 int err; 17 int err;
18 _ARGCHK(pt != NULL); 18 _ARGCHK(pt != NULL);
19 _ARGCHK(ct != NULL); 19 _ARGCHK(ct != NULL);
20 _ARGCHK(ecb != NULL); 20 _ARGCHK(ecb != NULL);
21 21
22 /* valid cipher? */
22 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) { 23 if ((err = cipher_is_valid(ecb->cipher)) != CRYPT_OK) {
23 return err; 24 return err;
24 } 25 }
26 _ARGCHK(cipher_descriptor[ecb->cipher].ecb_decrypt != NULL);
27
25 cipher_descriptor[ecb->cipher].ecb_decrypt(ct, pt, &ecb->key); 28 cipher_descriptor[ecb->cipher].ecb_decrypt(ct, pt, &ecb->key);
26 return CRYPT_OK; 29 return CRYPT_OK;
27 } 30 }
28 31
29 #endif 32 #endif