Skip to content

Commit fe737cc

Browse files
committed
Clean up Javadoc
Fixes gh-8480
1 parent d450885 commit fe737cc

File tree

1 file changed

+7
-4
lines changed
  • crypto/src/main/java/org/springframework/security/crypto/encrypt

1 file changed

+7
-4
lines changed

crypto/src/main/java/org/springframework/security/crypto/encrypt/Encryptors.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2011-2016 the original author or authors.
2+
* Copyright 2011-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ public class Encryptors {
3232
* (Password-Based Key Derivation Function #2). Salts the password to prevent
3333
* dictionary attacks against the key. The provided salt is expected to be
3434
* hex-encoded; it should be random and at least 8 bytes in length. Also applies a
35-
* random 16 byte initialization vector to ensure each encrypted message will be
35+
* random 16-byte initialization vector to ensure each encrypted message will be
3636
* unique. Requires Java 6.
3737
*
3838
* @param password the password used to generate the encryptor's secret key; should
@@ -50,7 +50,7 @@ public static BytesEncryptor stronger(CharSequence password, CharSequence salt)
5050
* Derives the secret key using PKCS #5's PBKDF2 (Password-Based Key Derivation
5151
* Function #2). Salts the password to prevent dictionary attacks against the key. The
5252
* provided salt is expected to be hex-encoded; it should be random and at least 8
53-
* bytes in length. Also applies a random 16 byte initialization vector to ensure each
53+
* bytes in length. Also applies a random 16-byte initialization vector to ensure each
5454
* encrypted message will be unique. Requires Java 6.
5555
* NOTE: This mode is not
5656
* <a href="https://en.wikipedia.org/wiki/Authenticated_encryption">authenticated</a>
@@ -63,7 +63,7 @@ public static BytesEncryptor stronger(CharSequence password, CharSequence salt)
6363
* @param salt a hex-encoded, random, site-global salt value to use to generate the
6464
* key
6565
*
66-
* @see #stronger(CharSequence, CharSequence) which uses the significatly more secure
66+
* @see #stronger(CharSequence, CharSequence), which uses the significatly more secure
6767
* GCM (instead of CBC)
6868
*/
6969
public static BytesEncryptor standard(CharSequence password, CharSequence salt) {
@@ -105,7 +105,10 @@ public static TextEncryptor text(CharSequence password, CharSequence salt) {
105105
* not be shared
106106
* @param salt a hex-encoded, random, site-global salt value to use to generate the
107107
* secret key
108+
* @deprecated This encryptor is not secure. Instead, look to your data store for a
109+
* mechanism to query encrypted data.
108110
*/
111+
@Deprecated
109112
public static TextEncryptor queryableText(CharSequence password, CharSequence salt) {
110113
return new HexEncodingTextEncryptor(new AesBytesEncryptor(password.toString(),
111114
salt));

0 commit comments

Comments
 (0)