什么是在Python中实现的好的双向加密库? [英] What's a good two-way encryption library implemented in Python?

查看:107
本文介绍了什么是在Python中实现的好的双向加密库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用的应用程序的身份验证系统现在使用的是一个双向哈希,基本上只是一个荣耀的凯撒密码。没有关于它的发展情况的太多细节,我想用更安全的加密算法来代替它(它需要在服务器端完成)。不幸的是,它需要是双向的,并且hashlib中的算法都是单向的。

The authentication system for an application we're using right now uses a two-way hash that's basically little more than a glorified caesar cypher. Without going into too much detail about what's going on with it, I'd like to replace it with a more secure encryption algorithm (and it needs to be done server-side). Unfortunately, it needs to be two-way and the algorithms in hashlib are all one-way.

什么是一些很好的加密库,包括这种事情的算法?

What are some good encryption libraries that will include algorithms for this kind of thing?

推荐答案

如果是双向的,那不是真的哈希。它是加密的(从这些东西的声音,这真的更像是一个盐或密码,而不是真正的加密)。哈希是单向定义 。所以,而不是像MD5或SHA1这样的东西,你需要寻找更像PGP的东西。

If it's two-way, it's not really a "hash". It's encryption (and from the sounds of things this is really more of a 'salt' or 'cypher', not real encryption.) A hash is one-way by definition. So rather than something like MD5 or SHA1 you need to look for something more like PGP.

其次,你能解释双向要求背后的原因吗?这通常不被认为是认证系统的良好做法。

Secondly, can you explain the reasoning behind the 2-way requirement? That's not generally considered good practice for authentication systems any more.

这篇关于什么是在Python中实现的好的双向加密库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆