fixed getRandomStringNullPrefix

This commit is contained in:
jomu
2015-02-21 19:53:36 +00:00
parent 6a8de77311
commit 3660c8a9a4
2 changed files with 1 additions and 10 deletions

View File

@ -102,7 +102,7 @@ public abstract class PasswordUtil {
String usedPrefix = (prefix == null ? "" : prefix); String usedPrefix = (prefix == null ? "" : prefix);
int idLength = length - usedPrefix.length(); int idLength = length - usedPrefix.length();
return prefix + createSaltString(idLength); return usedPrefix + createSaltString(idLength);
} }

View File

@ -1,16 +1,7 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package de.muehlencord.shared.security; package de.muehlencord.shared.security;
import static de.muehlencord.shared.security.PasswordUtil.getScryptHash; import static de.muehlencord.shared.security.PasswordUtil.getScryptHash;
import static de.muehlencord.shared.security.PasswordUtil.validateScryptHash; import static de.muehlencord.shared.security.PasswordUtil.validateScryptHash;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.*;