• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

使用objective-c加密和解密密码

用户头像
it1352
帮助1

问题说明

如何加密 nsstring 并将其存储在文件中,以及如何解密.

How to encrypt a nsstring and store it in a file, and how to decrypt the same.

请建议我使用 wat api 的...

Please suggest me wat api's i shld use...

正确答案

#1

这是我用来加密的函数.

This is the function i used for encryptiong.

DES_cfb64_encrypt( ( unsigned char * ) pchInputData, ( unsigned char * ) pchOutCipher,大小,&schedule,&ParityKey,&no,DES_ENCRYPT);

DES_cfb64_encrypt( ( unsigned char * ) pchInputData, ( unsigned char * ) pchOutCipher, size, &schedule, &ParityKey, &no, DES_ENCRYPT );

我必须将其转换为 base64,以便我可以将其存储在文件中.
pstrResult = Base64encoding(size,( unsigned char * )pchOutCipher);

I had to convert this to base64 so that i can store it in a file.
pstrResult = Base64encoding(size,( unsigned char * )pchOutCipher);

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcfjeee
系列文章
更多 icon
同类精品
更多 icon
继续加载