Skip to content

Commit 85d377f

Browse files
committed
Document current behavior
1 parent 4ef9946 commit 85d377f

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class Md5Crypt {
7171
* {@link #apr1Crypt(byte[], Random)}.
7272
* </p>
7373
*
74-
* @param keyBytes plaintext string to hash.
74+
* @param keyBytes plaintext string to hash. Each array element is set to {@code 0} before returning.
7575
* @return the hash value
7676
* @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. *
7777
* @see #apr1Crypt(byte[], String)
@@ -86,7 +86,7 @@ public static String apr1Crypt(final byte[] keyBytes) {
8686
* A salt is generated for you using the user provided {@link Random}.
8787
* </p>
8888
*
89-
* @param keyBytes plaintext string to hash.
89+
* @param keyBytes plaintext string to hash. Each array element is set to {@code 0} before returning.
9090
* @param random the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}
9191
* or {@link ThreadLocalRandom}.
9292
* @return the hash value
@@ -132,7 +132,7 @@ public static String apr1Crypt(final byte[] keyBytes, String salt) {
132132
* </p>
133133
*
134134
* @param keyBytes
135-
* plaintext string to hash.
135+
* plaintext string to hash. Each array element is set to {@code 0} before returning.
136136
* @return the hash value
137137
* @throws IllegalArgumentException
138138
* when a {@link java.security.NoSuchAlgorithmException} is caught.
@@ -150,7 +150,7 @@ public static String apr1Crypt(final String keyBytes) {
150150
* </p>
151151
*
152152
* @param keyBytes
153-
* plaintext string to hash.
153+
* plaintext string to hash. Each array element is set to {@code 0} before returning.
154154
* @param salt
155155
* salt string including the prefix and optionally garbage at the end. The salt may be null, in which
156156
* case a salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using
@@ -175,7 +175,7 @@ public static String apr1Crypt(final String keyBytes, final String salt) {
175175
* {@link SecureRandom} to generate your own salts and calling {@link #md5Crypt(byte[], String)}.
176176
* </p>
177177
* @param keyBytes
178-
* plaintext string to hash.
178+
* plaintext string to hash. Each array element is set to {@code 0} before returning.
179179
* @return the hash value
180180
* @throws IllegalArgumentException
181181
* when a {@link java.security.NoSuchAlgorithmException} is caught.
@@ -194,7 +194,7 @@ public static String md5Crypt(final byte[] keyBytes) {
194194
* A salt is generated for you using the instance of {@link Random} you supply.
195195
* </p>
196196
* @param keyBytes
197-
* plaintext string to hash.
197+
* plaintext string to hash. Each array element is set to {@code 0} before returning.
198198
* @param random
199199
* the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}
200200
* or {@link ThreadLocalRandom}.

0 commit comments

Comments
 (0)