Giter VIP home page Giter VIP logo

cyhtools's Introduction

CyhTools

keychain保存,APP与设备信息,图片缓存

pod 'CyhTools'

1.钥匙串

  [Cyhkeychain save_key:@"key" data_values:@"钥匙串信息,请打开capabilities中的钥匙串"];

NSLog(@"钥匙串保存信息:%@",
[Cyhkeychain load_key:@"key"]);
//    [Cyhkeychain delete_key:@"key"];

   NSLog(@"手机标识信息:%@", [Cyhkeychain getUUID]);

2.AES/ECB加密

    NSString * AESencrypt = [cyhAESCrypt encrypt:@"encryptString" password:@"123456"];    NSString * AESdecrypt = [cyhAESCrypt decrypt:AESencrypt password:@"123456"];

NSData * ECBencrypt = [cyhAESCrypt encryptText:@"encryptString" key:@"123456"];
NSString * ECBdecrypt = [cyhAESCrypt decryptText:ECBencrypt key:@"123456"];
NSString * ecbEnstring = [NSString stringByEncodingData:ECBencrypt];  

3.MD5/SHA加密

  NSString * md5string = [@"md5String" md5];   NSString * shaString = [@"ShaString" SHA1];

4.设备信息

    NSLog(@"手机别名:%@\n手机系统版本:%@\n 地方型号(国际化区域名称):%@\n设备名称:%@\n设备当前网络IP:%@\n", [Cyhkeychain userPhoneName], [Cyhkeychain phoneVersion], [Cyhkeychain localPhoneModel], [Cyhkeychain deviceName], [Cyhkeychain getIPAddress:YES]);     5.app信息       NSLog(@"App当前名字:%@\nAPP当前版本号:%@\nAPP当前构建版本号:%@\n当前设备型号:%@\n", [Cyhkeychain appCurName], [Cyhkeychain appCurVersion], [Cyhkeychain appCurVersionNum], [Cyhkeychain iOSplatform]);

[[Cyhkeychain getAllphoneNumList] enumerateObjectsUsingBlock:^(NSDictionary * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
    NSLog(@"通讯录:%@==%@",[obj objectForKey:@"name"],[obj objectForKey:@"phonenum"]);
}];

6.textfield/textView键盘“完成”键  
    self.textTF.placeholder = @"textfield";   [self.textTF setKeyboardButton:^(UITools *Tool) { Tool.buttonTitle(@"完成"); Tool.buttonTitlecolor([UIColor redColor]); Tool.buttonBGcolor([UIColor orangeColor]); Tool.buttonTitleFont(17);     } Compel:^(BOOL finish) { NSLog(@"注销响应");   }];

    [self.textVw setKeyboardButton:^(UITools *Tool) { Tool.buttonTitle(@"完成"); Tool.buttonTitlecolor([UIColor whiteColor]); Tool.buttonBGcolor([UIColor orangeColor]); Tool.buttonTitleFont(17);   } Compel:^(BOOL finish) { NSLog(@"注销textview响应");

  }];

cyhtools's People

Contributors

cyhai9 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.