安全算法
2016-03-21 16:01
288 查看
md5算法
MD5 and SHA are hash functions (SHA is actually a family of hash functions) - they take a piece of data, compact it and create a suitably unique output that is very hard to emulate with a different piece of data. They don't encrypt anything - you can't take MD5 or SHA output and "unhash" it to get back to your starting point. The difference between the two lies in what algorithm they use to create the hash. Also note that MD5 is now broken as a way was discovered to easily generate collisions and should not be used nor trusted anymore.
RSA is an assymetric encryption algorithm. You have two keys (private and public) and you can perform a function with one key (encrypt or decrypt) and reverse with the other key. Which key you use depends on whether you are trying to do a digital signature or an encryption.
使用
MD5 and SHA are hash functions (SHA is actually a family of hash functions) - they take a piece of data, compact it and create a suitably unique output that is very hard to emulate with a different piece of data. They don't encrypt anything - you can't take MD5 or SHA output and "unhash" it to get back to your starting point. The difference between the two lies in what algorithm they use to create the hash. Also note that MD5 is now broken as a way was discovered to easily generate collisions and should not be used nor trusted anymore.
RSA is an assymetric encryption algorithm. You have two keys (private and public) and you can perform a function with one key (encrypt or decrypt) and reverse with the other key. Which key you use depends on whether you are trying to do a digital signature or an encryption.
使用
echo -n code=value2name=value3personid=value1202cb962234w4ers2aa|md5sum nginx lua 中使用 sign = ngx.md5(md5_target)
相关文章推荐
- 如何通过 OAuth 2.0 使 iOS Apps 集成 LinkedIn 登录功能?
- 升级openssl
- pc手机&姓名&地址验证&input提示文案兼容ie
- 工业相机笔记
- 防火墙IPTABLES常用设置
- nutch简介
- Git的使用
- neutron的基本原理
- 数据结构学习笔记01链表
- Cognos与Firefox的那些事
- C# 单元测试
- Web Api单元测试写法
- 第三次作业(上)
- 总结链表和顺序表的优缺点
- 自定义ListView分别获取子类和父类的权限
- 跨浏览器的事件对象
- 在使用cocoapods的过程中出现 Use the `$(inherited)` flag, or Remove the build settings from the target.
- PHP设计模式 迭代器模式
- JS DOM实现鼠标滑动图片效果
- Nutch搜索引擎(第1期)_ Nutch简介及安装