GithubHelp home page GithubHelp logo

narzolliam / easyaes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pkuoliver/easyaes

0.0 0.0 0.0 18 KB

AES encrypt/decrypt, Android, iOS, php compatible(兼容php, Android, iOS平台)

Home Page: http://diducoder.com

Java 9.41% PHP 3.01% Objective-C 87.58%

easyaes's Introduction

EasyAES

AES encrypt/decrypt, Android, iOS, php compatible(兼容php, Android, iOS平台)

可以在三个平台间加密解密数据,确保某个平台加密的数据,在另外两个平台能够解密。

Android版本用法:

String text = "this is pliat text.";
// encrypt
String data = EasyAES.encryptString(data);
// dencrypt
String plaitText = EasyAES.dencryptString(data);

php版本用法:

function encryptString($content) {
	$aes = new EasyAESCrypt('****************', 128, '################');
	return $aes->encrypt($content);
}
 
function decryptString($content) {
	$aes = new EasyAESCrypt('****************', 128, '################');
	return $aes->decrypt($content);
}

注意:php版本用到了mcrypt模块,需要安装并在php.ini中开启

iOS版本用法

NSData* pData = ...//encrypted data form server
NSData* plaitData = [NSData AES128DecryptedData:data];

以上所有版本都需要设置下自己的加密密码以及偏移向量iv,均为16位字符。

后期计划加上C#, C, C++版本,敬请期待。

更多信息请访问我的博客帝都码农

easyaes's People

Contributors

pkuoliver 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.