Commit 7dd3011f authored by michael's avatar michael

factorize VARIANT2 (smaller and slower)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8372 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a52acc7c
...@@ -86,32 +86,15 @@ static void transform(uint32_t state[5], uint8_t buffer[64]){ ...@@ -86,32 +86,15 @@ static void transform(uint32_t state[5], uint8_t buffer[64]){
d = state[3]; d = state[3];
e = state[4]; e = state[4];
#ifdef VARIANT2 #ifdef VARIANT2
for(i=0; i<20; i++){ for(i=0; i<80; i++){
int t= R0b(a,b,c,d,e,i); int t= e+block[i]+rol(a,5);;
e= d; if(i<40){
d= c; if(i<20) t+= ((b&(c^d))^d) +0x5A827999;
c= rol(b,30); else t+= ( b^c ^d) +0x6ED9EBA1;
b= a; }else{
a= t; if(i<60) t+= (((b|c)&d)|(b&c))+0x8F1BBCDC;
} else t+= ( b^c ^d) +0xCA62C1D6;
for(; i<40; i++){ }
int t= R2b(a,b,c,d,e,i);
e= d;
d= c;
c= rol(b,30);
b= a;
a= t;
}
for(; i<60; i++){
int t= R3b(a,b,c,d,e,i);
e= d;
d= c;
c= rol(b,30);
b= a;
a= t;
}
for(; i<80; i++){
int t= R4b(a,b,c,d,e,i);
e= d; e= d;
d= c; d= c;
c= rol(b,30); c= rol(b,30);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment