You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/08/10 12:11:21 UTC

[commons-codec] branch master updated: Document current behavior

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git


The following commit(s) were added to refs/heads/master by this push:
     new 85d377f1 Document current behavior
85d377f1 is described below

commit 85d377f1de68fe2821ed2df08ab3843b4a9a9a9c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Aug 10 08:11:17 2023 -0400

    Document current behavior
---
 src/main/java/org/apache/commons/codec/digest/Md5Crypt.java | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java b/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
index aeb4a3ff..331e8220 100644
--- a/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
+++ b/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
@@ -71,7 +71,7 @@ public class Md5Crypt {
      * {@link #apr1Crypt(byte[], Random)}.
      * </p>
      *
-     * @param keyBytes plaintext string to hash.
+     * @param keyBytes plaintext string to hash. Each array element is set to {@code 0} before returning.
      * @return the hash value
      * @throws IllegalArgumentException when a {@link java.security.NoSuchAlgorithmException} is caught. *
      * @see #apr1Crypt(byte[], String)
@@ -86,7 +86,7 @@ public class Md5Crypt {
      * A salt is generated for you using the user provided {@link Random}.
      * </p>
      *
-     * @param keyBytes plaintext string to hash.
+     * @param keyBytes plaintext string to hash. Each array element is set to {@code 0} before returning.
      * @param random the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}
      *            or {@link ThreadLocalRandom}.
      * @return the hash value
@@ -132,7 +132,7 @@ public class Md5Crypt {
      * </p>
      *
      * @param keyBytes
-     *            plaintext string to hash.
+     *            plaintext string to hash. Each array element is set to {@code 0} before returning.
      * @return the hash value
      * @throws IllegalArgumentException
      *             when a {@link java.security.NoSuchAlgorithmException} is caught.
@@ -150,7 +150,7 @@ public class Md5Crypt {
      * </p>
      *
      * @param keyBytes
-     *            plaintext string to hash.
+     *            plaintext string to hash. Each array element is set to {@code 0} before returning.
      * @param salt
      *            salt string including the prefix and optionally garbage at the end. The salt may be null, in which
      *            case a salt is generated for you using {@link ThreadLocalRandom}; for more secure salts consider using
@@ -175,7 +175,7 @@ public class Md5Crypt {
      * {@link SecureRandom} to generate your own salts and calling {@link #md5Crypt(byte[], String)}.
      * </p>
      * @param keyBytes
-     *            plaintext string to hash.
+     *            plaintext string to hash. Each array element is set to {@code 0} before returning.
      * @return the hash value
      * @throws IllegalArgumentException
      *             when a {@link java.security.NoSuchAlgorithmException} is caught.
@@ -194,7 +194,7 @@ public class Md5Crypt {
      * A salt is generated for you using the instance of {@link Random} you supply.
      * </p>
      * @param keyBytes
-     *            plaintext string to hash.
+     *            plaintext string to hash. Each array element is set to {@code 0} before returning.
      * @param random
      *            the instance of {@link Random} to use for generating the salt. Consider using {@link SecureRandom}
      *            or {@link ThreadLocalRandom}.