8136459: MessageDigest.isEqual is not a "simple byte compare"
Summary: Update the corresponding javadoc with @implNote and clarification.
Reviewed-by: mullan, darcy
--- a/jdk/src/java.base/share/classes/java/security/MessageDigest.java Thu Jul 14 16:04:38 2016 -0700
+++ b/jdk/src/java.base/share/classes/java/security/MessageDigest.java Fri Jul 15 01:24:22 2016 +0000
@@ -439,7 +439,12 @@
}
/**
- * Compares two digests for equality. Does a simple byte compare.
+ * Compares two digests for equality. Two digests are equal if they have
+ * the same length and all bytes at corresponding positions are equal.
+ *
+ * @implNote
+ * If the digests are the same length, all bytes are examined to
+ * determine equality.
*
* @param digesta one of the digests to compare.
*