support de crypt salt avec salt en hexadécimal

This commit is contained in:
Jephté Clain 2013-11-19 14:46:40 +04:00
parent 0e9fd3bdf6
commit 4ff7ce3387
1 changed files with 6 additions and 1 deletions

View File

@ -4658,7 +4658,12 @@ public class upassword {
println("salt: " + toHex(binarySalt));
println("ssha: " + ssha);
println("smd5: " + smd5);
if (salt.length() >= 2) {
String cryptSalt = Salt.getCryptSalt(salt);
String crypt = getPasswordCryptSalt(clear, Password.CRYPT, cryptSalt).getNormalized();
if (!salt.equals(cryptSalt)) println("salt: " + cryptSalt);
println("crypt: " + crypt);
}
} else {
String cryptSalt = Salt.getCryptSalt(salt);
String crypt = getPasswordCryptSalt(clear, Password.CRYPT, cryptSalt).getNormalized();