我正在从php平台迁移到Java。我的数据库充满了数据加密标准(DES)中存储密码的用户。我通常会这样做自定义authenticationService:数据加密标准(DES)+ SPRING BOOT认证
@Autowired
private AuthenticationServiceImpl authenticationService;
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(authenticationService)
.passwordEncoder(new BCryptPasswordEncoder());
}
显然不会使用bCrypt。有什么建议么?
请,**永远不要**存储用户密码,甚至不需要发明最强大的加密功能,因为它本质上**不安全**。存储*盐渍密码哈希*而不是每个密码都不同。阅读此内容以获得有关此主题的良好概述:https://crackstation.net/hashing-security.htm –