pike.git
/
src
/
post_modules
/
Nettle
/
hash.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/Nettle/hash.cmod:253:
static inline void b64enc(char *dest, int a, int b, int c, int sz) { unsigned int bitbuf = a | (b << 8) | (c << 16); while (sz--) { *(dest++) = b64tab[bitbuf & 63]; bitbuf >>= 6; } }
-
/*! @decl string(0..
255
) crypt_hash(string password, string salt, rounds)
+
/*! @decl string(0..
127
) crypt_hash(string password, string salt, rounds)
*! *! Password hashing function in @[crypt_md5()]-style. *! *! Implements the algorithm described in *! @url{http://www.akkadia.org/drepper/SHA-crypt.txt@}. *! *! This is the algorithm used by @tt{crypt(2)@} in *! methods @tt{$5$@} (SHA256) and @tt{$6$@} (SHA512). *! *! @seealso *! @[crypt_md5()] */
-
PIKEFUN string(0..
255
) crypt_hash(string password, string salt, int rounds)
+
PIKEFUN string(0..
127
) crypt_hash(string password, string salt, int rounds)
{ struct pike_string *res; const struct nettle_hash *meta = THIS->meta; void *ctx; uint8_t *abcbuf; uint8_t *dpbuf; uint8_t *dsbuf; unsigned char *p; unsigned char *s;