EasyAES
AES encrypt/decrypt, Android, iOS, php, Python, C# compatible(兼容php, Android, iOS, Python平台)
Install / Use
/learn @pkuoliver/EasyAESREADME
EasyAES
AES encrypt/decrypt library, Android, iOS, PHP, Python, C# compatible.
Data can be encrypted and decrypted between five platforms, and data encrypted on one platform can be decrypted on the other four platforms.
Usage
Android:
String text = "this is plain text.";
EasyAES aes = new EasyAES("password here", 256, "iv here");
// encrypt
String data = aes.encrypt(text);
// decrypt
String plainText = aes.decrypt(data);
PHP:
$text = "this is plain text.";
$aes = new EasyAES('password here', 256, 'iv here');
// encrypt
$data = $aes->encrypt($text);
// decrypt
$plainText = $aes->decrypt($data);
Notes:The php5.x version uses the mcrypt extension, which needs to be installed and enabled in php.ini. php7.0 and above use the ssl module, so mcrypt is no longer required.
iOS
EasyAES *aes = [[EasyAES alloc] initWithKey:@"your key" bit:256 andIV:@"your iv"];
// encrypt
NSString *data = [aes encrypt:text];
// decrypt
NSString *plainText = [aes decrypt:data];
// encrypt/decrypt NSData
NSData *pData = ...//encrypted data form server
NSData *plainData = [aes decryptedData:pData];
NSData *encData = [aes encryptedData:plainData];
Python
text = "this is plain text."
aes = EasyAES('password here', 256, 'iv here')
# encrypt string
data = aes.encrypt(text)
# decrypt string
plainText = aes.decrypt(data)
C#
string text = "this is plain text.";
EasyAES aes = new EasyAES("password here", 256, "iv here");
// encrypt
string encText = aes.Encrypt(text);
// decrypt
string decText = aes.Decrypt(encText);
All of the above usage need to set own password and offset vector(iv).
128 bit or 256 bit
The 256-bit AES encryption algorithm has higher security, so it is strongly recommended to use the 256-bit encryption method, but it will cause some performance losses.
If you are very sensitive to performance, you can use the 128-bit method, just change the second parameter of the constructor to 128.
TODO List
Later plans to complete the C, C++ version, so stay tuned.
For more information, please visit my blog 帝都码农
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
96.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
344.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
