| 1 | #cxx . . $ `<file>/ref10/crypto_rng/rng.c`/include <string.h> |
| 2 | #include "crypto_stream_salsa20.h"cxx . . $ `<file>/ref10/crypto_stream/crypto_stream_salsa20.h`/ |
| 3 | #include "crypto_rng.h"cxx . . $ `<file>/ref10/crypto_rng/crypto_rng.h`/ |
| 4 | |
| 5 | #define crypto_streamcxx . . $ `ref10/crypto_rng/rng.c:5:9`! crypto_stream_salsa20cxx . . $ `ref10/crypto_stream/crypto_stream_salsa20.h:18:9`! |
| 6 | #define KEYBYTEScxx . . $ `ref10/crypto_rng/rng.c:6:9`! crypto_stream_salsa20_KEYBYTEScxx . . $ `ref10/crypto_stream/crypto_stream_salsa20.h:20:9`! |
| 7 | #define NONCEBYTEScxx . . $ `ref10/crypto_rng/rng.c:7:9`! crypto_stream_salsa20_NONCEBYTEScxx . . $ `ref10/crypto_stream/crypto_stream_salsa20.h:21:9`! |
| 8 | #define OUTPUTBYTEScxx . . $ `ref10/crypto_rng/rng.c:8:9`! crypto_rng_OUTPUTBYTEScxx . . $ `ref10/crypto_rng/crypto_rng.h:8:9`! |
| 9 | |
| 10 | #if KEYBYTEScxx . . $ `ref10/crypto_rng/rng.c:6:9`! != crypto_rng_KEYBYTEScxx . . $ `ref10/crypto_rng/crypto_rng.h:7:9`! |
| 11 | KEYBYTES mismatch! |
| 12 | #endif |
| 13 | |
| 14 | static const unsigned char noncecxx . . $ nonce.[NONCEBYTEScxx . . $ `ref10/crypto_rng/rng.c:7:9`!] = {0}; |
| 15 | |
| 16 | int crypto_rngcxx . . $ `ref10/crypto_rng/crypto_rng.h:6:9`!( |
| 17 | unsigned char *r, /* random output */ |
| 18 | unsigned char *n, /* new key */ |
| 19 | const unsigned char *g /* old key */ |
| 20 | ) |
| 21 | { |
| 22 | unsigned char x[KEYBYTEScxx . . $ `ref10/crypto_rng/rng.c:6:9`! + OUTPUTBYTEScxx . . $ `ref10/crypto_rng/rng.c:8:9`!]; |
| 23 | crypto_streamcxx . . $ `ref10/crypto_rng/rng.c:5:9`!(x,sizeof x,noncecxx . . $ nonce.,g); |
| 24 | memcpycxx . . $ memcpy(cc817cb175f282d).(n,x,KEYBYTEScxx . . $ `ref10/crypto_rng/rng.c:6:9`!); |
| 25 | memcpycxx . . $ memcpy(cc817cb175f282d).(r,x + KEYBYTEScxx . . $ `ref10/crypto_rng/rng.c:6:9`!,OUTPUTBYTEScxx . . $ `ref10/crypto_rng/rng.c:8:9`!); |
| 26 | return 0; |
| 27 | } |