[BACK]Return to crypt.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libcrypt

File: [cvs.NetBSD.org] / src / lib / libcrypt / crypt.h (download)

Revision 1.5, Mon Oct 21 02:36:48 2019 UTC (2 years ago) by jhigh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.4: +8 -1 lines

adding argon2 support to libcrypt. argon2 user authentication now
available via MKARGON2=yes (3 variants supported; argon2id recommended)
before using, please read argon2 paper at
https://github.com/P-H-C/phc-winner-argon2

/*
 * $NetBSD: crypt.h,v 1.5 2019/10/21 02:36:48 jhigh Exp $
 */
char	*__md5crypt(const char *pw, const char *salt);	/* XXX */
char *__bcrypt(const char *, const char *);	/* XXX */
char *__crypt_sha1(const char *pw, const char *salt);
unsigned int __crypt_sha1_iterations (unsigned int hint);
void __hmac_sha1(const unsigned char *, size_t, const unsigned char *, size_t,
		 unsigned char *);
void __crypt_to64(char *s, u_int32_t v, int n);

#ifdef HAVE_ARGON2
char *__crypt_argon2(const char *pw, const char *salt);
int __gensalt_argon2id(char *salt, size_t saltsiz, const char *option);
int __gensalt_argon2i(char *salt, size_t saltsiz, const char *option);
int __gensalt_argon2d(char *salt, size_t saltsiz, const char *option);
#endif /* HAVE_ARGON2 */

int __gensalt_blowfish(char *salt, size_t saltlen, const char *option);
int __gensalt_old(char *salt, size_t saltsiz, const char *option);
int __gensalt_new(char *salt, size_t saltsiz, const char *option);
int __gensalt_md5(char *salt, size_t saltsiz, const char *option);
int __gensalt_sha1(char *salt, size_t saltsiz, const char *option);

#define SHA1_MAGIC "$sha1$"
#define SHA1_SIZE 20