【问题标题】:Spring Security Password encoding concatSpring Security 密码编码 concat
【发布时间】:2014-04-23 22:45:30
【问题描述】:

我正在寻找 Spring 密码编码的工作原理。它如何连接字符串? 例如,我有密码“密码”和盐“盐”。它是如何调用encode方法的?

  • 编码('passwordsalt')
  • 编码('saltpassword')

【问题讨论】:

    标签: spring encoding spring-security


    【解决方案1】:

    Spring Security 像这样连接密码和盐:

     password{salt}
    

    连接的字符串被放入散列函数中,例如使用MD5:

     md5('password{salt}')
    

    安全说明:如今,单个 MD5 被认为是非常弱的。只是一个例子。

    【讨论】:

      猜你喜欢
      • 2012-01-17
      • 2023-03-09
      • 2019-10-26
      • 2016-01-01
      • 2014-02-14
      • 1970-01-01
      • 2021-03-20
      • 2020-05-26
      • 1970-01-01
      相关资源
      最近更新 更多