Update Formatting and Style
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Argon2 password encoding support.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.argon2;
|
||||
|
||||
|
||||
+7
@@ -52,6 +52,7 @@ public class BCryptPasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance using the given strength.
|
||||
* @param strength the log rounds to use, between 4 and 31
|
||||
*/
|
||||
public BCryptPasswordEncoder(int strength) {
|
||||
@@ -59,6 +60,7 @@ public class BCryptPasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance using the given bcrypt version.
|
||||
* @param version the version of bcrypt, can be 2a,2b,2y
|
||||
*/
|
||||
public BCryptPasswordEncoder(BCryptVersion version) {
|
||||
@@ -66,6 +68,7 @@ public class BCryptPasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance using the given bcrypt version and secure random instance.
|
||||
* @param version the version of bcrypt, can be 2a,2b,2y
|
||||
* @param random the secure random instance to use
|
||||
*/
|
||||
@@ -74,6 +77,7 @@ public class BCryptPasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance using the given strength and secure random instance.
|
||||
* @param strength the log rounds to use, between 4 and 31
|
||||
* @param random the secure random instance to use
|
||||
*/
|
||||
@@ -82,6 +86,7 @@ public class BCryptPasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance using the given bcrypt version and strength.
|
||||
* @param version the version of bcrypt, can be 2a,2b,2y
|
||||
* @param strength the log rounds to use, between 4 and 31
|
||||
*/
|
||||
@@ -90,6 +95,8 @@ public class BCryptPasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance using the given bcrypt version, strength, and secure random
|
||||
* instance.
|
||||
* @param version the version of bcrypt, can be 2a,2b,2y
|
||||
* @param strength the log rounds to use, between 4 and 31
|
||||
* @param random the secure random instance to use
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* BCrypt password encoding support.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.bcrypt;
|
||||
|
||||
|
||||
+2
@@ -31,6 +31,8 @@ import org.springframework.core.io.Resource;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A factory for reading key pairs and secret keys from a Java {@link KeyStore}.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @author Tim Ysewyn
|
||||
* @since 6.3
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
package org.springframework.security.crypto.encrypt;
|
||||
|
||||
/**
|
||||
* The RSA algorithm and padding scheme to use when encrypting or decrypting.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 6.3
|
||||
*/
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
package org.springframework.security.crypto.encrypt;
|
||||
|
||||
/**
|
||||
* A holder for an RSA public key.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 6.3
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,8 @@ import javax.crypto.Cipher;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* An encryptor that uses RSA keys directly, without wrapping via a keystore.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 6.3
|
||||
*/
|
||||
|
||||
+2
@@ -34,6 +34,8 @@ import org.springframework.security.crypto.codec.Hex;
|
||||
import org.springframework.security.crypto.keygen.KeyGenerators;
|
||||
|
||||
/**
|
||||
* An encryptor that uses RSA public/private key pairs to encrypt and decrypt data.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 6.3
|
||||
*/
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Symmetric and asymmetric encryption support.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.encrypt;
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder;
|
||||
import org.springframework.security.crypto.scrypt.SCryptPasswordEncoder;
|
||||
|
||||
/**
|
||||
* Used for creating {@link PasswordEncoder} instances
|
||||
* Used for creating {@link PasswordEncoder} instances.
|
||||
*
|
||||
* @author Rob Winch
|
||||
* @since 5.0
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Factories for creating commonly used PasswordEncoder instances.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.factory;
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Key generation utilities.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.keygen;
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import org.springframework.security.crypto.keygen.KeyGenerators;
|
||||
import org.springframework.security.crypto.util.EncodingUtils;
|
||||
|
||||
/**
|
||||
* Abstract base class for password encoders
|
||||
* Abstract base class for password encoders.
|
||||
*
|
||||
* @author Rob Worsnop
|
||||
*/
|
||||
|
||||
+2
-2
@@ -153,7 +153,7 @@ public class DelegatingPasswordEncoder extends AbstractValidatingPasswordEncoder
|
||||
private PasswordEncoder defaultPasswordEncoderForMatches = new UnmappedIdPasswordEncoder();
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
* Creates a new instance.
|
||||
* @param idForEncode the id used to lookup which {@link PasswordEncoder} should be
|
||||
* used for {@link #encode(CharSequence)}
|
||||
* @param idToPasswordEncoder a Map of id to {@link PasswordEncoder} used to determine
|
||||
@@ -165,7 +165,7 @@ public class DelegatingPasswordEncoder extends AbstractValidatingPasswordEncoder
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
* Creates a new instance.
|
||||
* @param idForEncode the id used to lookup which {@link PasswordEncoder} should be
|
||||
* used for {@link #encode(CharSequence)}
|
||||
* @param idToPasswordEncoder a Map of id to {@link PasswordEncoder} used to determine
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ import org.springframework.security.crypto.keygen.KeyGenerators;
|
||||
@Deprecated
|
||||
public class LdapShaPasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
|
||||
/** The number of bytes in a SHA hash */
|
||||
/** The number of bytes in a SHA hash. */
|
||||
private static final int SHA_LENGTH = 20;
|
||||
|
||||
private static final String SSHA_PREFIX = "{SSHA}";
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ public class Md4PasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
|
||||
/**
|
||||
* Takes a previously encoded password and compares it with a rawpassword after mixing
|
||||
* in the salt and encoding that value
|
||||
* in the salt and encoding that value.
|
||||
* @param rawPassword plain text password
|
||||
* @param encodedPassword previously encoded password
|
||||
* @return true or false
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@ public class MessageDigestPasswordEncoder extends AbstractValidatingPasswordEnco
|
||||
|
||||
/**
|
||||
* Takes a previously encoded password and compares it with a rawpassword after mixing
|
||||
* in the salt and encoding that value
|
||||
* in the salt and encoding that value.
|
||||
* @param rawPassword plain text password
|
||||
* @param encodedPassword previously encoded password
|
||||
* @return true or false
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@ public class Pbkdf2PasswordEncoder extends AbstractValidatingPasswordEncoder {
|
||||
}
|
||||
|
||||
/**
|
||||
* The Algorithm used for creating the {@link SecretKeyFactory}
|
||||
* The Algorithm used for creating the {@link SecretKeyFactory}.
|
||||
*
|
||||
* @since 5.0
|
||||
*/
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Password encoding and hashing implementations.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.password;
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Password encoding support backed by the password4j library.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.password4j;
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SCrypt password encoding support.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.scrypt;
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Internal encoding utilities used by the crypto module.
|
||||
*/
|
||||
@NullMarked
|
||||
package org.springframework.security.crypto.util;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user