Skip to content

Commit f2528be

Browse files
committed
Document how strings are converted to bytes for digest
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1493409 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7fb904f commit f2528be

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public static byte[] md2(final InputStream data) throws IOException {
203203
* Calculates the MD2 digest and returns the value as a 16 element <code>byte[]</code>.
204204
*
205205
* @param data
206-
* Data to digest
206+
* Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}
207207
* @return MD2 digest
208208
* @since 1.7
209209
*/
@@ -278,7 +278,7 @@ public static byte[] md5(final InputStream data) throws IOException {
278278
* Calculates the MD5 digest and returns the value as a 16 element <code>byte[]</code>.
279279
*
280280
* @param data
281-
* Data to digest
281+
* Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}
282282
* @return MD5 digest
283283
*/
284284
public static byte[] md5(final String data) {
@@ -393,7 +393,7 @@ public static byte[] sha1(final InputStream data) throws IOException {
393393
* Calculates the SHA-1 digest and returns the value as a <code>byte[]</code>.
394394
*
395395
* @param data
396-
* Data to digest
396+
* Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}
397397
* @return SHA-1 digest
398398
*/
399399
public static byte[] sha1(final String data) {
@@ -477,7 +477,7 @@ public static byte[] sha256(final InputStream data) throws IOException {
477477
* </p>
478478
*
479479
* @param data
480-
* Data to digest
480+
* Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}
481481
* @return SHA-256 digest
482482
* @since 1.4
483483
*/
@@ -571,7 +571,7 @@ public static byte[] sha384(final InputStream data) throws IOException {
571571
* </p>
572572
*
573573
* @param data
574-
* Data to digest
574+
* Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}
575575
* @return SHA-384 digest
576576
* @since 1.4
577577
*/
@@ -665,7 +665,7 @@ public static byte[] sha512(final InputStream data) throws IOException {
665665
* </p>
666666
*
667667
* @param data
668-
* Data to digest
668+
* Data to digest; converted to bytes using {@link StringUtils#getBytesUtf8(String)}
669669
* @return SHA-512 digest
670670
* @since 1.4
671671
*/
@@ -807,7 +807,7 @@ public static MessageDigest updateDigest(final MessageDigest digest, final Input
807807
* @param messageDigest
808808
* the {@link MessageDigest} to update
809809
* @param valueToDigest
810-
* the value to update the {@link MessageDigest} with
810+
* the value to update the {@link MessageDigest} with; converted to bytes using {@link StringUtils#getBytesUtf8(String)}
811811
* @return the updated {@link MessageDigest}
812812
* @since 1.7
813813
*/

0 commit comments

Comments
 (0)