Make SHA512 the default for mkpasswd again, as SHA512 support is guaranteed to *always* be in libratbox.
This commit is contained in:
parent
28545c3683
commit
565b527019
|
@ -162,7 +162,16 @@ main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if(flag & FLAG_BLOWFISH)
|
||||
if(flag & FLAG_MD5)
|
||||
{
|
||||
if(length == 0)
|
||||
length = 8;
|
||||
if(flag & FLAG_SALT)
|
||||
salt = make_md5_salt_para(saltpara);
|
||||
else
|
||||
salt = make_md5_salt(length);
|
||||
}
|
||||
else if(flag & FLAG_BLOWFISH)
|
||||
{
|
||||
if(length == 0)
|
||||
length = 22;
|
||||
|
@ -180,15 +189,6 @@ main(int argc, char *argv[])
|
|||
else
|
||||
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)
|
||||
{
|
||||
/* XXX - rounds needs to be done */
|
||||
|
@ -231,11 +231,11 @@ main(int argc, char *argv[])
|
|||
else
|
||||
{
|
||||
if(length == 0)
|
||||
length = 8;
|
||||
length = 16;
|
||||
if(flag & FLAG_SALT)
|
||||
salt = make_md5_salt_para(saltpara);
|
||||
salt = make_sha512_salt_para(saltpara);
|
||||
else
|
||||
salt = make_md5_salt(length);
|
||||
salt = make_sha512_salt(length);
|
||||
}
|
||||
|
||||
if(flag & FLAG_PASS)
|
||||
|
|
Loading…
Reference in New Issue