From: Mikko Rasa Date: Sat, 16 Apr 2016 10:57:29 +0000 (+0300) Subject: Remove useless programmatical filling of MD5::rotate_table X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=301b4c112badbf68edbffe0ac363d1e4f40a4640;p=libs%2Fcrypto.git Remove useless programmatical filling of MD5::rotate_table The table is so small that static initialization is easier, and in fact the initializer is already there so the code wasn't even run. --- diff --git a/source/md5.cpp b/source/md5.cpp index c989526..1fe7003 100644 --- a/source/md5.cpp +++ b/source/md5.cpp @@ -82,18 +82,6 @@ void MD5::init() if(!sin_table[0]) for(unsigned i=0; i<64; ++i) sin_table[i] = 4294967296.0*abs(sin((i+1)*1.0)); - - if(!rotate_table[0]) - { - for(unsigned i=0; i<4; ++i) - rotate_table[i] = 7+i*5; - for(unsigned i=0; i<4; ++i) - rotate_table[4+i] = 5+i*4+i*i/3; - for(unsigned i=0; i<4; ++i) - rotate_table[8+i] = 4+i*7; - for(unsigned i=0; i<4; ++i) - rotate_table[12+i] = 6+i*4+i*i/3; - } } void MD5::update(const char *data, unsigned len)