diff options
author | Denis Vlasenko | 2008-11-07 13:36:46 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-11-07 13:36:46 +0000 |
commit | 30e1ab691cba8e472be329206ee576f685229f2f (patch) | |
tree | e259797b1fb3579ce53d3a903486d73b74a2f3e9 | |
parent | 2ec94a7ee84969dd8b206e1363be8ea58fd6779e (diff) | |
download | busybox-30e1ab691cba8e472be329206ee576f685229f2f.zip busybox-30e1ab691cba8e472be329206ee576f685229f2f.tar.gz |
libbb: add a TODO to support new SHA-based encrypted passwords
-rw-r--r-- | libbb/pw_encrypt.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/libbb/pw_encrypt.c b/libbb/pw_encrypt.c index 469e71f..0b826f4 100644 --- a/libbb/pw_encrypt.c +++ b/libbb/pw_encrypt.c @@ -20,6 +20,11 @@ static const uint8_t ascii64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh #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* FAST_FUNC pw_encrypt(const char *clear, const char *salt, int cleanup) { 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) 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)); } |