Branch: Tag:

2017-07-19

2017-07-19 18:15:19 by Martin Nilsson <nilsson@fastmail.com>

3-5 times faster pbkdf2 for SHA1 and SHA256

36:   #ifdef HAVE_NETTLE_GOSTHASH94_H   #include <nettle/gosthash94.h>   #endif + #ifdef HAVE_NETTLE_PBKDF2_H + #include <nettle/pbkdf2.h> + #endif      #include "fdlib.h"   
602:   /* The algorithm objects can be overloaded in pike. */      #cmod_define TOSTR(DEF) #DEF + #undef SPECIAL_PBKDF2    -  +    #cmod_define PIKE_NAME MD5   #cmod_define NETTLE_NAME md5   #cmod_include "hash.H"
623:      #cmod_define PIKE_NAME SHA1   #cmod_define NETTLE_NAME sha1 + #define SPECIAL_PBKDF2   #cmod_include "hash.H" -  + #undef SPECIAL_PBKDF2   #cmod_undef PIKE_NAME   #cmod_undef NETTLE_NAME   
639:      #cmod_define PIKE_NAME SHA256   #cmod_define NETTLE_NAME sha256 + #define SPECIAL_PBKDF2   #cmod_include "hash.H" -  + #undef SPECIAL_PBKDF2   #cmod_undef PIKE_NAME   #cmod_undef NETTLE_NAME