comparison ctr_setiv.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
28 if (len != (unsigned long)ctr->blocklen) { 28 if (len != (unsigned long)ctr->blocklen) {
29 return CRYPT_INVALID_ARG; 29 return CRYPT_INVALID_ARG;
30 } 30 }
31 31
32 /* set IV */ 32 /* set IV */
33 memcpy(ctr->ctr, IV, len); 33 XMEMCPY(ctr->ctr, IV, len);
34 34
35 /* force next block */ 35 /* force next block */
36 ctr->padlen = 0; 36 ctr->padlen = 0;
37 cipher_descriptor[ctr->cipher].ecb_encrypt(IV, ctr->pad, &ctr->key); 37 cipher_descriptor[ctr->cipher].ecb_encrypt(IV, ctr->pad, &ctr->key);
38 38