时代在进步,你还不来学习IOS代签小知识?

时间:2019-11-15 17:24 作者:ios签名
随着互联网络的发展,智能手机也是日新月异的前进。IOS常见的几种加密方式大家都有了解,接下来跟随ios签名小编来了解一下:

----钥匙串存储
/* 用原生的 Security.framework 就可以实现钥匙串的访问、读写。但是只能在真机上进行,模拟器会出错。在 Github(https://github.com/ldandersen/scifihifi-iphone/tree/master/security) 上有个封装的非常好的类来实现这个功能,让你既能在模拟器又能在真机上访问钥匙串。
 */    - (void)initSecurity{               
 //----使用第三方SFHFKeychainUtils--                       
 //获取应用程序唯一标识--        NSString* bundleld = [NSBundle mainBundle].bundleIdentifier;              
 //引入头文件//#import "SFHFKeychainUtils.h"//     
   //       
 //删除用户//       
 [SFHFKeychainUtils deleteItemForUsername:userName andServiceName:ServiceName error:nil];//    
    //       
 //存储账户密码//      
  [SFHFKeychainUtils storeUsername:userName andPassword:passwordNew forServiceName:ServiceName updateExisting:YES  error:nil];//     
   //      
  //根据用户名取出密码//   
     NSString  *passWord = [SFHFKeychainUtils getPasswordForUsername:userName andServiceName:ServiceName error:nil];
LINKS友情链接