Browse Source

minor performance improvements

pull/869/head
orignal 8 years ago
parent
commit
474d52f805
  1. 3
      libi2pd/Gost.cpp

3
libi2pd/Gost.cpp

@ -323,7 +323,7 @@ namespace crypto @@ -323,7 +323,7 @@ namespace crypto
for (int i = 63; i >= 0; i--)
{
uint16_t sum = buf[i] + other.buf[i] + carry;
ret.buf[i] = sum & 0xFF;
ret.buf[i] = sum;
carry = sum >> 8;
}
return ret;
@ -333,6 +333,7 @@ namespace crypto @@ -333,6 +333,7 @@ namespace crypto
{
for (int i = 63; i >= 0; i--)
{
if (!c) return;
c += buf[i];
buf[i] = c;
c >>= 8;

Loading…
Cancel
Save