added libtomcrypt-1.03

This commit is contained in:
Tom St Denis
2005-06-09 00:08:13 +00:00
committed by Steffen Jaeckel
parent 65c1317eee
commit 3964a6523a
285 changed files with 5920 additions and 2287 deletions
+7 -2
View File
@@ -27,7 +27,8 @@
*/
int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
{
int err, n, x;
unsigned long n, x;
int err;
LTC_ARGCHK(omac != NULL);
LTC_ARGCHK(in != NULL);
@@ -57,7 +58,7 @@ int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
while (inlen != 0) {
/* ok if the block is full we xor in prev, encrypt and replace prev */
if (omac->buflen == omac->blklen) {
for (x = 0; x < omac->blklen; x++) {
for (x = 0; x < (unsigned long)omac->blklen; x++) {
omac->block[x] ^= omac->prev[x];
}
cipher_descriptor[omac->cipher_idx].ecb_encrypt(omac->block, omac->prev, &omac->key);
@@ -77,3 +78,7 @@ int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
#endif
/* $Source$ */
/* $Revision$ */
/* $Date$ */