Debian Codegraph @

crypto_encode/1277x2627round/ref/encode.c

raw
1 // 20250302 djb: port to -Wc++-compat
2 #include "crypto_encode_1277x2627.h"
3 #include "crypto_encode.h"
4 #include "crypto_int16.h"
5 #include "crypto_int8.h"
6 #define int16 crypto_int16
7
8 #define p 1277
9
10 void crypto_encode(unsigned char *out,const void *v)
11 {
12 const int16 *a = (const int16 *) v;
13 int16 x[p];
14 int i;
15
16 for (i = 0;i < p;++i) x[i] = 3*((10923*a[i]+16384)>>15);
17 crypto_encode_1277x2627(out,x);
18 }