svn commit: trunk/busybox/libbb
vda at busybox.net
vda at busybox.net
Fri Nov 7 13:36:46 UTC 2008
Author: vda
Date: 2008-11-07 05:36:46 -0800 (Fri, 07 Nov 2008)
New Revision: 23959
Log:
libbb: add a TODO to support new SHA-based encrypted passwords
Modified:
trunk/busybox/libbb/pw_encrypt.c
Changeset:
Modified: trunk/busybox/libbb/pw_encrypt.c
===================================================================
--- trunk/busybox/libbb/pw_encrypt.c 2008-11-07 12:59:31 UTC (rev 23958)
+++ trunk/busybox/libbb/pw_encrypt.c 2008-11-07 13:36:46 UTC (rev 23959)
@@ -20,6 +20,11 @@
#include "pw_encrypt_des.c"
#include "pw_encrypt_md5.c"
+/* Other advanced crypt ids: */
+/* $2$ or $2a$: Blowfish */
+/* $5$: SHA-256 */
+/* $6$: SHA-512 */
+/* TODO: implement SHA - http://people.redhat.com/drepper/SHA-crypt.txt */
static struct const_des_ctx *des_cctx;
static struct des_ctx *des_ctx;
@@ -54,12 +59,6 @@
{
char *encrypted;
-#if 0 /* was CONFIG_FEATURE_SHA1_PASSWORDS, but there is no such thing??? */
- if (strncmp(salt, "$2$", 3) == 0) {
- return sha1_crypt(clear);
- }
-#endif
-
encrypted = my_crypt(clear, salt);
if (cleanup)
@@ -72,12 +71,6 @@
char* FAST_FUNC pw_encrypt(const char *clear, const char *salt, int cleanup)
{
-#if 0 /* was CONFIG_FEATURE_SHA1_PASSWORDS, but there is no such thing??? */
- if (strncmp(salt, "$2$", 3) == 0) {
- return xstrdup(sha1_crypt(clear));
- }
-#endif
-
return xstrdup(crypt(clear, salt));
}
More information about the busybox-cvs
mailing list