crypto_encode/1277xint16/ref/encode.c
raw| 1 | // 20250302 djb: port to -Wc++-compat |
| 2 | #include "crypto_encode.h" |
| 3 | #include "crypto_uint16.h" |
| 4 | |
| 5 | void crypto_encode(unsigned char *s,const void *v) |
| 6 | { |
| 7 | const crypto_uint16 *x = (const crypto_uint16 *) v; |
| 8 | int i; |
| 9 | |
| 10 | for (i = 0;i < 1277;++i) { |
| 11 | crypto_uint16 u = *x++; |
| 12 | *s++ = u; |
| 13 | *s++ = u >> 8; |
| 14 | } |
| 15 | } |