xref: /netbsd-src/lib/libcrypt/crypt.h (revision f9151ba9431bb13bf0df1b3f46076c89c8d4b5cd)
1 /*
2  * $NetBSD: crypt.h,v 1.8 2021/10/16 10:53:33 nia Exp $
3  */
4 
5 #define crypt_private     __attribute__((__visibility__("hidden")))
6 
7 crypt_private char *__md5crypt(const char *, const char *);	/* XXX */
8 crypt_private char *__bcrypt(const char *, const char *);	/* XXX */
9 crypt_private char *__crypt_sha1(const char *, const char *);
10 crypt_private unsigned int __crypt_sha1_iterations (unsigned int);
11 crypt_private void __hmac_sha1(const unsigned char *, size_t,
12     const unsigned char *, size_t, unsigned char *);
13 
14 #ifdef HAVE_ARGON2
15 crypt_private char *__crypt_argon2(const char *, const char *);
16 crypt_private int __gensalt_argon2id(char *, size_t, const char *);
17 crypt_private int __gensalt_argon2i(char *, size_t, const char *);
18 crypt_private int __gensalt_argon2d(char *, size_t, const char *);
19 #endif /* HAVE_ARGON2 */
20 
21 crypt_private int __gensalt_blowfish(char *, size_t, const char *);
22 crypt_private int __gensalt_old(char *, size_t, const char *);
23 crypt_private int __gensalt_new(char *, size_t, const char *);
24 crypt_private int __gensalt_md5(char *, size_t, const char *);
25 crypt_private int __gensalt_sha1(char *, size_t, const char *);
26 
27 crypt_private int getnum(const char *, size_t *);
28 crypt_private void __crypt_to64(char *, uint32_t, int);
29 crypt_private void __crypt_tobase64(char *, uint32_t, int);
30 
31 #define SHA1_MAGIC "$sha1$"
32 #define SHA1_SIZE 20
33