From 0b68c872deb676b0cb104bfb30a1f356072b5edf Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Mon, 19 Dec 2011 01:24:16 -0600 Subject: libcrypt: add support for SHA512-CRYPT password hashing This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work in uClibc. The differences from the GLIBC version are as follows: - b64_from_24bit() has been converted into a macro - Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed It is enabled by the UCLIBC_HAS_SHA512_CRYPT_IMPL configuration symbol. You must have UCLIBC_HAS_CRYPT_IMPL enabled as well. Signed-off-by: William Pitcock Signed-off-by: Bernhard Reutner-Fischer (cherry picked from commit 4c24dabb9cea4c8148d7a7efc7a1df694424c483) --- libcrypt/libcrypt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libcrypt/libcrypt.h') diff --git a/libcrypt/libcrypt.h b/libcrypt/libcrypt.h index 11866200c..fcad6aed0 100644 --- a/libcrypt/libcrypt.h +++ b/libcrypt/libcrypt.h @@ -9,8 +9,11 @@ #define __LIBCRYPT_H__ extern char *__md5_crypt(const unsigned char *pw, const unsigned char *salt) attribute_hidden; +extern char *__sha512_crypt(const unsigned char *pw, const unsigned char *salt) attribute_hidden; extern char *__des_crypt(const unsigned char *pw, const unsigned char *salt) attribute_hidden; +extern char *__sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen) attribute_hidden; + /* shut up gcc-4.x signed warnings */ #define strcpy(dst,src) strcpy((char*)dst,(char*)src) #define strlen(s) strlen((char*)s) -- cgit v1.2.3