X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=md5.c;h=20ec519c961a9152c235d8653351da9d0bbbee20;hb=f215d8ed649fd5bf5f85eb34f851a1539302013d;hp=ac07042bcc83dfe372d71a696617f0a7ee422f0d;hpb=a397db40b94b01a3ed72f9367961cf68d82593d1;p=avr-crypto-lib.git diff --git a/md5.c b/md5.c index ac07042..20ec519 100644 --- a/md5.c +++ b/md5.c @@ -1,6 +1,6 @@ /* md5.c */ /* - This file is part of the Crypto-avr-lib/microcrypt-lib. + This file is part of the AVR-Crypto-Lib. Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -80,7 +80,8 @@ void md5_core(uint32_t* a, void* block, uint8_t as, uint8_t s, uint8_t i, uint8_ uart_hexdump(&s, 1); uart_putc(' '); uart_hexdump(&i, 1); uart_putc(']'); #endif - t = a[as] + funcs[fi](a[(as+1)&3], a[(as+2)&3], a[(as+3)&3]) + *((uint32_t*)block) + md5_T[i] ; + t = a[as] + funcs[fi](a[(as+1)&3], a[(as+2)&3], a[(as+3)&3]) + + *((uint32_t*)block) + pgm_read_dword(md5_T+i) ; a[as]=a[(as+1)&3] + ROTL32(t, s); }