pike.git/
src/
post_modules/
Nettle/
hash.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2013-12-08
2013-12-08 13:04:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>
f6a6adcf577a4df66fafab8dcd1eaf04c056c3d1 (
14
lines) (+
9
/-
5
)
[
Show
|
Annotate
]
Branch:
8.0
Nettle: All narrow strings should now be declared as such.
112:
}
-
/*! @decl string(0..255) hash(string data)
+
/*! @decl string(0..255) hash(string
(0..255)
data)
*! *! Works as a (faster) shortcut for *! @expr{State()->update(data)->digest()@}, where State is
121:
*! @seealso *! @[State()->update()] and @[State()->digest()]. */
-
PIKEFUN string(0..255) hash(string in)
+
PIKEFUN string(0..255) hash(string
(0..255)
in)
optflags OPT_TRY_OPTIMIZE; { void *ctx;
245:
} /* NOTE: This is NOT the MIME base64 table! */
-
static const char b64tab[64] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
static const char b64tab[64] =
+
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static inline void b64enc(char *dest, int a, int b, int c, int sz) {
256:
} }
-
/*! @decl string(0..127) crypt_hash(string password, string salt, int rounds)
+
/*! @decl string(0..127) crypt_hash(string
(0..255)
password,
@
+
*!
string
(0..255)
salt, int rounds)
*! *! Password hashing function in @[crypt_md5()]-style. *!
271:
*! @seealso *! @[crypt_md5()] */
-
PIKEFUN string(0..127) crypt_hash(string password, string salt, int rounds)
+
PIKEFUN string(0..127) crypt_hash(string
(0..255)
password,
+
string
(0..255)
salt, int rounds)
{ struct pike_string *res; const struct nettle_hash *meta = THIS->meta;