1
0
mirror of synced 2026-08-05 17:57:15 +00:00

Add crypto PasswordEncoder from 5.0.x

Fixes: gh-5302
This commit is contained in:
Rob Winch
2018-05-03 16:22:50 -05:00
parent c683bc10bf
commit 0f612bf637
30 changed files with 2114 additions and 9 deletions
@@ -22,7 +22,10 @@ package org.springframework.security.authentication.encoding;
* </p>
*
* @author colin sampaleanu
* @deprecated This is deprecated and marked for deletion. Replace with an implementation
* of {@link org.springframework.security.crypto.password.PasswordEncoder}
*/
@Deprecated
public abstract class BaseDigestPasswordEncoder extends BasePasswordEncoder {
// ~ Instance fields
// ================================================================================================
@@ -22,7 +22,10 @@ package org.springframework.security.authentication.encoding;
* </p>
*
* @author Ben Alex
* @deprecated This is deprecated and marked for deletion. Replace with an implementation
* of {@link org.springframework.security.crypto.password.PasswordEncoder}
*/
@Deprecated
public abstract class BasePasswordEncoder implements PasswordEncoder {
// ~ Methods
// ========================================================================================================
@@ -32,6 +32,8 @@ import org.springframework.util.Assert;
* and non-encoded passwords are in use or when a null implementation is required.
*
* @author Luke Taylor
* @deprecated @deprecated This is deprecated and marked for deletion. Replace with
* of {@link org.springframework.security.crypto.password.LdapShaPasswordEncoder}
*/
public class LdapShaPasswordEncoder implements PasswordEncoder {
// ~ Static fields/initializers
@@ -31,7 +31,10 @@ import org.springframework.security.crypto.codec.Utf8;
* legacy applications, it's not secure, don't use it for anything new!
*
* @author Alan Stewart
* @deprecated This is deprecated and marked for deletion. Replace with an implementation
* of {@link org.springframework.security.crypto.password.Md4PasswordEncoder}
*/
@Deprecated
public class Md4PasswordEncoder extends BaseDigestPasswordEncoder {
// ~ Methods
@@ -33,7 +33,11 @@ package org.springframework.security.authentication.encoding;
* @author Ray Krueger
* @author colin sampaleanu
* @author Ben Alex
* @deprecated This is deprecated and marked for deletion. Replace with an implementation
* of {@link org.springframework.security.crypto.password.MessageDigestPasswordEncoder}
* with an algorithm of "MD5"
*/
@Deprecated
public class Md5PasswordEncoder extends MessageDigestPasswordEncoder {
public Md5PasswordEncoder() {
@@ -51,7 +51,10 @@ import org.springframework.util.Assert;
* @author Ray Krueger
* @author Luke Taylor
* @since 1.0.1
* @deprecated This is deprecated and marked for deletion. Replace with an implementation
* of {@link org.springframework.security.crypto.password.MessageDigestPasswordEncoder}
*/
@Deprecated
public class MessageDigestPasswordEncoder extends BaseDigestPasswordEncoder {
private final String algorithm;
@@ -29,7 +29,10 @@ import java.util.Locale;
*
* @author colin sampaleanu
* @author Ben Alex
* @deprecated This class will be removed in Spring Security 5. For passivity switch to
* {@link org.springframework.security.crypto.password.NoOpPasswordEncoder}.
*/
@Deprecated
public class PlaintextPasswordEncoder extends BasePasswordEncoder {
// ~ Instance fields
// ================================================================================================
@@ -40,7 +40,11 @@ package org.springframework.security.authentication.encoding;
* @author Ray Krueger
* @author colin sampaleanu
* @author Ben Alex
* @deprecated This is deprecated and marked for deletion. Replace with an implementation
* of {@link org.springframework.security.crypto.password.MessageDigestPasswordEncoder}
* with an algorithm "SHA-$strength" (i.e. "SHA-1" or "SHA-256").
*/
@Deprecated
public class ShaPasswordEncoder extends MessageDigestPasswordEncoder {
/**