01e1152003-03-12Niels Möller /* nettle.h * * Shared declarations for the various files. */ struct program; extern struct program *nettle_hash_program; extern struct program *hash_instance_program; extern struct program *nettle_hash_program;
a467f92004-03-20Henrik Grubbström (Grubba) #define NO_WIDE_STRING(s) do { \ if ((s)->size_shift) \
dc8a672004-01-22Martin Nilsson  Pike_error("Bad argument. Must be 8-bit string.\n"); \
a467f92004-03-20Henrik Grubbström (Grubba)  } while(0)
37f2572003-03-13Niels Möller 
e8be7c2010-11-14Jonas Walldén 
d42d732010-11-14Jonas Walldén /* Hashing methods can normally process hundreds of megabytes per second
e8be7c2010-11-14Jonas Walldén  so it's rather wasteful to enable threads during hashing of smaller data sizes. Limit is now 1 MB. */ #define THREADS_ALLOW_THRESHOLD (1024 * 1024)
4c4c702014-04-24Martin Nilsson #ifdef HAVE_NETTLE_DSA_PARAMS_INIT
07bae92014-04-24Martin Nilsson /* We use the presence of nettle_dsa_params_init() to detect Nettle * 3.0 or later. In Nettle 3.0 length fields use size_t, where earlier * it was unsigned.
4c4c702014-04-24Martin Nilsson  */ typedef size_t pike_nettle_size_t; #else typedef unsigned pike_nettle_size_t; #endif
79598b2008-12-13Martin Nilsson char *pike_crypt_md5(int pl, const char *const pw,
395c4a2012-07-25Martin Nilsson  int sl, const char *const salt, int ml, const char *const magic);
37f2572003-03-13Niels Möller 
a467f92004-03-20Henrik Grubbström (Grubba) void hash_init(void);
48f4542003-03-18Niels Möller 
a467f92004-03-20Henrik Grubbström (Grubba) void hash_exit(void);
48f4542003-03-18Niels Möller 
a467f92004-03-20Henrik Grubbström (Grubba) void cipher_init(void);
099d682004-01-30Martin Nilsson 
a467f92004-03-20Henrik Grubbström (Grubba) void cipher_exit(void);
099d682004-01-30Martin Nilsson 
a467f92004-03-20Henrik Grubbström (Grubba) void nt_init(void); void nt_exit(void);
d5f6892013-11-24Martin Nilsson  void hogweed_init(void); void hogweed_exit(void);
ee98922014-04-24Martin Nilsson  void mac_init(void); void mac_exit(void); void aead_init(void); void aead_exit(void);