1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Keep it simple to avoid issues with the different heaps in Emscripten

This commit is contained in:
Frank Denis 2015-11-26 17:06:18 +01:00
parent 20a13f60b5
commit a5b4926a19
4 changed files with 0 additions and 34 deletions

View File

@ -11,7 +11,6 @@ instructions set.
twice as fast as the portable one.
- An SSSE3 optimized implementation of ChaCha20 was added, and is
twice as fast as the portable one.
- sodium_increment(), crypto_verify_*() also got a speed bump.
- New helper functions have been added: `sodium_is_zero()` and
`sodium_add()`.
- `sodium_runtime_has_aesni()` now properly detects the CPU flag when

View File

@ -7,16 +7,6 @@
int
crypto_verify_16(const unsigned char *x, const unsigned char *y)
{
#ifdef CPU_UNALIGNED_ACCESS
uint_fast64_t d = 0U;
int i;
for (i = 0; i < 16; i += 4) {
d |= *((const uint32_t *) (const void *) &x[i]) ^
*((const uint32_t *) (const void *) &y[i]);
}
return (1 & ((d - 1) >> 32)) - 1;
#else
uint_fast16_t d = 0U;
int i;
@ -24,5 +14,4 @@ crypto_verify_16(const unsigned char *x, const unsigned char *y)
d |= x[i] ^ y[i];
}
return (1 & ((d - 1) >> 8)) - 1;
#endif
}

View File

@ -7,16 +7,6 @@
int
crypto_verify_32(const unsigned char *x, const unsigned char *y)
{
#ifdef CPU_UNALIGNED_ACCESS
uint_fast64_t d = 0U;
int i;
for (i = 0; i < 32; i += 4) {
d |= *((const uint32_t *) (const void *) &x[i]) ^
*((const uint32_t *) (const void *) &y[i]);
}
return (1 & ((d - 1) >> 32)) - 1;
#else
uint_fast16_t d = 0U;
int i;
@ -24,5 +14,4 @@ crypto_verify_32(const unsigned char *x, const unsigned char *y)
d |= x[i] ^ y[i];
}
return (1 & ((d - 1) >> 8)) - 1;
#endif
}

View File

@ -7,16 +7,6 @@
int
crypto_verify_64(const unsigned char *x, const unsigned char *y)
{
#ifdef CPU_UNALIGNED_ACCESS
uint_fast64_t d = 0U;
int i;
for (i = 0; i < 64; i += 4) {
d |= *((const uint32_t *) (const void *) &x[i]) ^
*((const uint32_t *) (const void *) &y[i]);
}
return (1 & ((d - 1) >> 32)) - 1;
#else
uint_fast16_t d = 0U;
int i;
@ -24,5 +14,4 @@ crypto_verify_64(const unsigned char *x, const unsigned char *y)
d |= x[i] ^ y[i];
}
return (1 & ((d - 1) >> 8)) - 1;
#endif
}