表单代填支持密码MD5算法

pull/29/head
smallbun 2023-08-14 20:53:17 +08:00
parent b138725729
commit 42a63d8900
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,7 @@ package cn.topiam.employee.protocol.form.authentication;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.security.authentication.AuthenticationManager;
@ -138,6 +139,9 @@ public final class FormAuthenticationTokenProvider implements AuthenticationProv
case AES -> {
return new AesUtils(encryptionKey).encrypt(fieldValue);
}
case MD5 -> {
return DigestUtils.md5Hex(fieldValue);
}
}
return fieldValue;
}