diff --git a/config/alfresco/authentication-services-context.xml b/config/alfresco/authentication-services-context.xml index 1d50de9eed..46ebf00c5c 100644 --- a/config/alfresco/authentication-services-context.xml +++ b/config/alfresco/authentication-services-context.xml @@ -149,6 +149,9 @@ + + + 256 diff --git a/source/java/org/alfresco/repo/security/authentication/NoOpPasswordEncoderImpl.java b/source/java/org/alfresco/repo/security/authentication/NoOpPasswordEncoderImpl.java new file mode 100644 index 0000000000..5816c33219 --- /dev/null +++ b/source/java/org/alfresco/repo/security/authentication/NoOpPasswordEncoderImpl.java @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2014-2014 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + */ +package org.alfresco.repo.security.authentication; + +import net.sf.acegisecurity.providers.encoding.BaseDigestPasswordEncoder; + + +/** + *

+ * NoOp implementation of PasswordEncoder. + *

+ * The No Op Password Encoder produces a blank hash. And will not match any value of hash. + * Used to replace an obsolete encoder like the MD4. + *

+ */ +public class NoOpPasswordEncoderImpl extends BaseDigestPasswordEncoder implements MD4PasswordEncoder +{ + + public NoOpPasswordEncoderImpl() + { + super(); + // TODO Auto-generated constructor stub + } + + // ~ Methods + // ================================================================ + + public boolean isPasswordValid(String encPass, String rawPass, Object salt) + { + return false; + } + + public String encodePassword(String rawPass, Object salt) + { + return ""; + } + + public byte[] decodeHash(String encodedHash) + { + return new byte[0]; + } + +}