pike.git
/
src
/
post_modules
/
Nettle
/
nettle.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/Nettle/nettle.cmod:309:
PIKECLASS Fortuna { CVAR struct aes_ctx aes_ctx; CVAR struct sha256_ctx sha_ctx; CVAR uint8_t *key; CVAR uint8_t *ctr; CVAR uint8_t *data; DECLARE_STORAGE;
+
#ifndef AES256_KEY_SIZE
+
#define AES256_KEY_SIZE (256>>3)
+
#endif
+
void fortuna_generate() { aes_encrypt(&THIS->aes_ctx, 16, THIS->data, THIS->ctr); INCREMENT(16, THIS->ctr); } void fortuna_rekey() { fortuna_generate(); MEMCPY(THIS->key, THIS->data, 16);