X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=md5.c;h=20ec519c961a9152c235d8653351da9d0bbbee20;hb=ff9f1b74e757f2f67b11c51f65b12fffaa02e18d;hp=1ecf02aa9e3a8d6046a464cca94038a4371bcfc4;hpb=17332291e15183d71d88ed868275e3cb53917180;p=avr-crypto-lib.git diff --git a/md5.c b/md5.c index 1ecf02a..20ec519 100644 --- a/md5.c +++ b/md5.c @@ -1,6 +1,6 @@ /* md5.c */ /* - This file is part of the This file is part of the AVR-Crypto-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); }