用于AES加密的IPhone中的不同填充模式和密码模式是什么? [英] What are different padding modes and cipher modes in IPhone for AES encryption?

查看:167
本文介绍了用于AES加密的IPhone中的不同填充模式和密码模式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



谢谢

解决方案

有两种填充模式 - PKCS#7和none - 和两种对应的密码模式 - CBC和ECB。如果你指定了 kCCOptionPKCS7Padding ,那么你得到CBC,如果你指定了 kCCOptionECBMode ,那么没有填充,你得到ECB。根据 CommonCrypto标题,默认为CBC 。


What are different padding modes and cipher modes in IPhone for AES encryption?

Thanks

解决方案

There are two padding modes--PKCS #7 and none--and two corresponding cipher modes--CBC and ECB. If you specify kCCOptionPKCS7Padding then you get CBC and if you specify kCCOptionECBMode then there's no padding and you get ECB. The default is CBC, according the CommonCrypto header.

这篇关于用于AES加密的IPhone中的不同填充模式和密码模式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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