omac: fix accidentally reverted patch
introduced in6816ac3f3f
reverted in8e7777b554
This commit is contained in:
parent
aa72cfe1d9
commit
c211ce7f66
@ -27,7 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
|
int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
|
||||||
{
|
{
|
||||||
unsigned long n, x, blklen;
|
unsigned long n, x;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
LTC_ARGCHK(omac != NULL);
|
LTC_ARGCHK(omac != NULL);
|
||||||
@ -42,7 +42,9 @@ int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LTC_FAST
|
#ifdef LTC_FAST
|
||||||
blklen = cipher_descriptor[omac->cipher_idx].block_length;
|
{
|
||||||
|
unsigned long blklen = cipher_descriptor[omac->cipher_idx].block_length;
|
||||||
|
|
||||||
if (omac->buflen == 0 && inlen > blklen) {
|
if (omac->buflen == 0 && inlen > blklen) {
|
||||||
unsigned long y;
|
unsigned long y;
|
||||||
for (x = 0; x < (inlen - blklen); x += blklen) {
|
for (x = 0; x < (inlen - blklen); x += blklen) {
|
||||||
@ -56,6 +58,7 @@ int omac_process(omac_state *omac, const unsigned char *in, unsigned long inlen)
|
|||||||
}
|
}
|
||||||
inlen -= x;
|
inlen -= x;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (inlen != 0) {
|
while (inlen != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user