Skip to content

Commit abbaedb

Browse files
committed
[CODEC-151] Remove unnecessary attempt to fill up the salt variable in UnixCrypt
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1379804 13f79535-47bb-0310-9956-ffa450edef68
1 parent 5204f72 commit abbaedb

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ The <action> type attribute can be add,update,fix,remove.
5151
</release>
5252
-->
5353
<release version="1.7" date="TBD" description="Feature and fix release.">
54+
<action issue="CODEC-151" dev="ggregory" type="add" due-to="lathspell">
55+
Remove unnecessary attempt to fill up the salt variable in UnixCrypt.
56+
</action>
5457
<action issue="CODEC-153" dev="ggregory" type="add" due-to="ggregory">
5558
Create a class MessageDigestAlgorithms to define standard algorithm names.
5659
</action>

src/main/java/org/apache/commons/codec/digest/UnixCrypt.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,6 @@ public static String crypt(byte[] original, String salt) {
245245
throw new IllegalArgumentException("Invalid salt value: " + salt);
246246
}
247247

248-
for (; salt.length() < 2; salt = salt + "A") {
249-
// NOOP
250-
}
251-
252248
StringBuilder buffer = new StringBuilder(" ");
253249
char charZero = salt.charAt(0);
254250
char charOne = salt.charAt(1);

0 commit comments

Comments
 (0)