pike.git/
src/
post_modules/
Nettle/
hash.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2017-07-19
2017-07-19 18:15:19 by Martin Nilsson <nilsson@fastmail.com>
5a1e2efabaf05294b198700582583a6e92bb49e1 (
10
lines) (+
10
/-
0
)
[
Show
|
Annotate
]
Branch:
8.1
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