@@ -39,9 +39,6 @@ public class Encryptors {
39
39
* not be shared
40
40
* @param salt a hex-encoded, random, site-global salt value to use to generate the
41
41
* key
42
- *
43
- * @see #standard(CharSequence, CharSequence) which uses the slightly weaker CBC mode
44
- * (instead of GCM)
45
42
*/
46
43
public static BytesEncryptor stronger (CharSequence password , CharSequence salt ) {
47
44
return new AesBytesEncryptor (password .toString (), salt ,
@@ -55,11 +52,19 @@ public static BytesEncryptor stronger(CharSequence password, CharSequence salt)
55
52
* provided salt is expected to be hex-encoded; it should be random and at least 8
56
53
* bytes in length. Also applies a random 16 byte initialization vector to ensure each
57
54
* encrypted message will be unique. Requires Java 6.
55
+ * NOTE: This mode is not
56
+ * <a href="https://en.wikipedia.org/wiki/Authenticated_encryption">authenticated</a>
57
+ * and does not provide any guarantees about the authenticity of the data.
58
+ * For a more secure alternative, users should prefer
59
+ * {@link #stronger(CharSequence, CharSequence)}.
58
60
*
59
61
* @param password the password used to generate the encryptor's secret key; should
60
62
* not be shared
61
63
* @param salt a hex-encoded, random, site-global salt value to use to generate the
62
64
* key
65
+ *
66
+ * @see #stronger(CharSequence, CharSequence) which uses the significatly more secure
67
+ * GCM (instead of CBC)
63
68
*/
64
69
public static BytesEncryptor standard (CharSequence password , CharSequence salt ) {
65
70
return new AesBytesEncryptor (password .toString (), salt ,
0 commit comments