minor performance improvements

This commit is contained in:
orignal 2017-04-27 10:12:22 -04:00
parent 7ee8bdf2f3
commit 474d52f805

View File

@ -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,9 +333,10 @@ namespace crypto
{
for (int i = 63; i >= 0; i--)
{
if (!c) return;
c += buf[i];
buf[i] = c;
c >>= 8;
c >>= 8;
}
}