mirror of
https://git.busybox.net/uClibc
synced 2025-10-14 18:52:11 +08:00

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_SHA256_CRYPT_IMPL configuration symbol. You must have UCLIBC_HAS_CRYPT_IMPL enabled as well. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
26 lines
1.1 KiB
C
26 lines
1.1 KiB
C
/* prototypes for internal crypt functions
|
|
*
|
|
* Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
|
|
*
|
|
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
|
|
*/
|
|
|
|
#ifndef __LIBCRYPT_H__
|
|
#define __LIBCRYPT_H__
|
|
|
|
extern char *__md5_crypt(const unsigned char *pw, const unsigned char *salt) attribute_hidden;
|
|
extern char *__sha256_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 *__sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen) 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)
|
|
#define strncat(dst,src,n) strncat((char*)dst,(char*)src,n)
|
|
#define strncmp(s1,s2,n) strncmp((char*)s1,(char*)s2,n)
|
|
|
|
#endif
|