diff --git a/security/src/main/java/de/muehlencord/shared/security/PasswordUtil.java b/security/src/main/java/de/muehlencord/shared/security/PasswordUtil.java index 01f6379..aa37795 100644 --- a/security/src/main/java/de/muehlencord/shared/security/PasswordUtil.java +++ b/security/src/main/java/de/muehlencord/shared/security/PasswordUtil.java @@ -102,7 +102,7 @@ public abstract class PasswordUtil { String usedPrefix = (prefix == null ? "" : prefix); int idLength = length - usedPrefix.length(); - return prefix + createSaltString(idLength); + return usedPrefix + createSaltString(idLength); } diff --git a/security/src/test/java/de/muehlencord/shared/security/PasswordUtilTest.java b/security/src/test/java/de/muehlencord/shared/security/PasswordUtilTest.java index b433561..3e097f3 100644 --- a/security/src/test/java/de/muehlencord/shared/security/PasswordUtilTest.java +++ b/security/src/test/java/de/muehlencord/shared/security/PasswordUtilTest.java @@ -1,16 +1,7 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - package de.muehlencord.shared.security; import static de.muehlencord.shared.security.PasswordUtil.getScryptHash; 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 static org.junit.Assert.*;