crypto_decode/653xint32/ref/decode.c
raw| 1 | // 20250302 djb: port to -Wc++-compat |
| 2 | #include "crypto_decode.h" |
| 3 | #include "crypto_uint32.h" |
| 4 | |
| 5 | void crypto_decode(void *v,const unsigned char *s) |
| 6 | { |
| 7 | crypto_uint32 *x = (crypto_uint32 *) v; |
| 8 | int i; |
| 9 | |
| 10 | for (i = 0;i < 653;++i) { |
| 11 | crypto_uint32 u0 = s[0]; |
| 12 | crypto_uint32 u1 = s[1]; |
| 13 | crypto_uint32 u2 = s[2]; |
| 14 | crypto_uint32 u3 = s[3]; |
| 15 | u1 <<= 8; |
| 16 | u2 <<= 16; |
| 17 | u3 <<= 24; |
| 18 | *x = u0 | u1 | u2 | u3; |
| 19 | x += 1; |
| 20 | s += 4; |
| 21 | } |
| 22 | } |