2015-02-08 33 views
-1

使用Spring Security BCryptPasswordEncoder可以向密碼添加額外的鹽嗎?使用Spring Security進行密碼散列安全

+1

可能是:http://stackoverflow.com/questions/21080777/grails-and-spring-security-salt-value-must-be-null-when-use-with-crypto-module – 2015-02-08 10:29:26

回答

2

你不能在自定義鹽中使用Bcrypt算法,因爲在這是如何工作的,這就是你不能在這個算法中擁有你自己定製鹽的原因。

即使您收到的錯誤消息也顯示相同的內容。如果您想使用自定義鹽源進行加密,則應該使用SHA-256或MD5算法。