mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Simplify bit flip in sha1.cpp
This commit is contained in:
@@ -103,7 +103,7 @@ void SHA1::process()
|
|||||||
{
|
{
|
||||||
if( t < 20 ) {
|
if( t < 20 ) {
|
||||||
K = 0x5a827999;
|
K = 0x5a827999;
|
||||||
f = (b & c) | ((b ^ 0xFFFFFFFF) & d);//TODO: try using ~
|
f = (b & c) | ((~b) & d);
|
||||||
} else if( t < 40 ) {
|
} else if( t < 40 ) {
|
||||||
K = 0x6ed9eba1;
|
K = 0x6ed9eba1;
|
||||||
f = b ^ c ^ d;
|
f = b ^ c ^ d;
|
||||||
|
Reference in New Issue
Block a user