Coder Social home page Coder Social logo

encrypt's Introduction

MD5Encrypt

一行代码搞定MD5加密、base64加密、aes加密、与base64解密和aes解密

PhotoShoot

image

How To Use

使用注意事项:
1. 在build phases中的GTMBase64.m需要设置 -fno-objc-arc


//md5加密
NSString *strEnRes = [CusMD5 md5String:@"需要加密的内容"];





//base64加密
NSData *dataEn = [@"需要加密的内容" dataUsingEncoding:NSUTF8StringEncoding];
NSData *dataEnRes = [GTMBase64 encodeData:dataEn];
//把加密结果转成string
NSString *base64EnRes = [[NSString alloc] initWithData:dataEnRes encoding:NSUTF8StringEncoding];


//base64解密
NSData *resDeBase64 = [GTMBase64 decodeData:@"需要解密的密文"];
NSString *strDeBase64 = [[NSString alloc] initWithData:resDeBase64 encoding:NSUTF8StringEncoding];





//aes 加密
NSString *strAESEnRes = [AESCrypt encrypt:@"需要加密的内容" password:@"secret"];

//aes 解密
NSString *strAESDeRes = [AESCrypt decrypt:@"需要解密的密文" password:@"secret"];


encrypt's People

Contributors

zws-china avatar

Watchers

 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.