comparison cbc_getiv.c @ 143:5d99163f7e32 libtomcrypt-orig

import of libtomcrypt 0.99
author Matt Johnston <matt@ucc.asn.au>
date Sun, 19 Dec 2004 11:34:45 +0000
parents 6362d3854bb4
children
comparison
equal deleted inserted replaced
15:6362d3854bb4 143:5d99163f7e32
19 _ARGCHK(len != NULL); 19 _ARGCHK(len != NULL);
20 _ARGCHK(cbc != NULL); 20 _ARGCHK(cbc != NULL);
21 if ((unsigned long)cbc->blocklen > *len) { 21 if ((unsigned long)cbc->blocklen > *len) {
22 return CRYPT_BUFFER_OVERFLOW; 22 return CRYPT_BUFFER_OVERFLOW;
23 } 23 }
24 memcpy(IV, cbc->IV, cbc->blocklen); 24 XMEMCPY(IV, cbc->IV, cbc->blocklen);
25 *len = cbc->blocklen; 25 *len = cbc->blocklen;
26 26
27 return CRYPT_OK; 27 return CRYPT_OK;
28 } 28 }
29 29