Home | History | Annotate | Line # | Download | only in libcrypt
crypt.h revision 1.1
      1 /*
      2  * $NetBSD: crypt.h,v 1.1 2004/07/02 00:05:23 sjg Exp $
      3  */
      4 char	*__md5crypt(const char *pw, const char *salt);	/* XXX */
      5 char *__bcrypt(const char *, const char *);	/* XXX */
      6 char *__crypt_sha1(const char *pw, const char *salt);
      7 unsigned int __crypt_sha1_iterations (unsigned int hint);
      8 void __hmac_sha1(unsigned char *, size_t, unsigned char *, size_t, unsigned char *);
      9 void __crypt_to64(char *s, u_int32_t v, int n);
     10 
     11 #define SHA1_MAGIC "$sha1$"
     12 #define SHA1_SIZE 20
     13 
     14 #ifdef __GNUC__
     15 #define UNCONST(ptr)	({ 		\
     16     union __unconst {			\
     17 	const void *__cp;		\
     18 	void *__p;			\
     19     } __d;				\
     20     __d.__cp = ptr, __d.__p; })
     21 #else
     22 #define UNCONST(ptr)	(void *)(ptr)
     23 #endif
     24