Mercurial > dropbear
comparison ocb_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 |
---|---|
20 int err, x; | 20 int err, x; |
21 | 21 |
22 _ARGCHK(ocb != NULL); | 22 _ARGCHK(ocb != NULL); |
23 _ARGCHK(pt != NULL); | 23 _ARGCHK(pt != NULL); |
24 _ARGCHK(ct != NULL); | 24 _ARGCHK(ct != NULL); |
25 | |
26 /* check if valid cipher */ | |
25 if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) { | 27 if ((err = cipher_is_valid(ocb->cipher)) != CRYPT_OK) { |
26 return err; | 28 return err; |
27 } | 29 } |
30 _ARGCHK(cipher_descriptor[ocb->cipher].ecb_decrypt != NULL); | |
31 | |
32 /* check length */ | |
28 if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) { | 33 if (ocb->block_len != cipher_descriptor[ocb->cipher].block_length) { |
29 return CRYPT_INVALID_ARG; | 34 return CRYPT_INVALID_ARG; |
30 } | 35 } |
31 | 36 |
32 /* Get Z[i] value */ | 37 /* Get Z[i] value */ |