mkpasswd: Default to SHA512 instead of inherently insecure DES.
This commit is contained in:
parent
01b7a527a3
commit
920cb1dc4a
1 changed files with 10 additions and 10 deletions
|
@ -190,15 +190,6 @@ main(int argc, char *argv[])
|
||||||
else
|
else
|
||||||
salt = make_sha256_salt(length);
|
salt = make_sha256_salt(length);
|
||||||
}
|
}
|
||||||
else if(flag & FLAG_SHA512)
|
|
||||||
{
|
|
||||||
if(length == 0)
|
|
||||||
length = 16;
|
|
||||||
if(flag & FLAG_SALT)
|
|
||||||
salt = make_sha512_salt_para(saltpara);
|
|
||||||
else
|
|
||||||
salt = make_sha512_salt(length);
|
|
||||||
}
|
|
||||||
else if(flag & FLAG_EXT)
|
else if(flag & FLAG_EXT)
|
||||||
{
|
{
|
||||||
/* XXX - rounds needs to be done */
|
/* XXX - rounds needs to be done */
|
||||||
|
@ -219,7 +210,7 @@ main(int argc, char *argv[])
|
||||||
salt = make_ext_salt(rounds);
|
salt = make_ext_salt(rounds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (flag & FLAG_DES)
|
||||||
{
|
{
|
||||||
if(flag & FLAG_SALT)
|
if(flag & FLAG_SALT)
|
||||||
{
|
{
|
||||||
|
@ -238,6 +229,15 @@ main(int argc, char *argv[])
|
||||||
salt = make_des_salt();
|
salt = make_des_salt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(length == 0)
|
||||||
|
length = 16;
|
||||||
|
if(flag & FLAG_SALT)
|
||||||
|
salt = make_sha512_salt_para(saltpara);
|
||||||
|
else
|
||||||
|
salt = make_sha512_salt(length);
|
||||||
|
}
|
||||||
|
|
||||||
if(flag & FLAG_PASS)
|
if(flag & FLAG_PASS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue