tomcat JNDI 128位加密
我在网上找到的大多数示例都是Base64编码,并不是真正对数据库访问的用户名密码进行加密。我们的要求是这些信息不能以明文形式存储,必须采用 128 位加密。我们确实有 DSN 设置,因为该数据库也可以从 .NET 应用程序访问。最坏的情况是我可以使用 JDBC-ODBC 桥,尽管 Sun 不推荐这种方法。
有谁有关于如何将用户名/密码加密为 128 位的经验吗?
谢谢!
Most of the sample I found online is Base64 encoding, not really encryption for the username password for database access. Our requirement is those info can't be store in clear text and has to be in 128-bit encryption. We do have DSN setup since this database will be accessed from a .NET application as well. Worst case I can use JDBC-ODBC bridge even though it's not recommended approach by Sun.
Does anyone have any experience on how to encypt the username / password into 128-bit?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Base64 不是加密,而是编码 - 并且几乎和纯文本一样不安全。
对于加密,可以查看 BouncyCastle API。
然而,实际上并不需要解密密码 - 使用单向散列要好得多( MD5、SHA-1 等)。
Base64 isn't encryption, it's encoding - and almost as insecure as plain text.
For encryption, maybe look at the BouncyCastle APIs.
However, there shouldn't really be any need to decrypt a password - it's far better to use one-way hashing (MD5, SHA-1 etc).