gurpartap / aescrypt-objc Goto Github PK
View Code? Open in Web Editor NEWA simple and opinionated AES encrypt / decrypt Objective-C class that just works.
License: MIT License
A simple and opinionated AES encrypt / decrypt Objective-C class that just works.
License: MIT License
re:
https://github.com/Gurpartap/AESCrypt-ObjC/blob/master/NSData%2BCommonCrypto.m#L177
The method name says AES256, but the algorithm identifier uses AES-128. The key being passed in is also the output from SHA-256, so it's a 256-bit key.
Mismatches?
I am testing this code.
The result is different from the site http://aes.online-domain-tools.com/
I appreciate if anybody can tell an advice to test the result.
Thank you in advance
it will be crash if i run my app on ios6 ,it seemed that nsdata+base64 not support , when i moidfied nsdata+base64.m ,it will be ok~
The code work well for me. But would you like to support cocoa pods?
I got this error message
/Users/MNurdin/Documents/iOS/RevivalxSwiftAESCrypt/RevivalxSwiftAESCrypt/AESCrypt/NSString+Base64.m:28:14: Definition of 'NSData' must be imported from module 'Foundation.NSData' before it is required
Code
lentext = [data length];
Please advice. Thank you.
It crashes the app if you keep the default optimization level of Release build as the 'Fastest'. So changing from the defaults to 'None' helped solve crashes!
Your code have problem, kindly solve it.
Hi,
Thanks for the code. It really helps and we are getting same result in iOS and Android with your code. Now we need to decrypt this code through PHP code.
Is there any code available which directly decrypting it by providing key?
Hello there,
I saw a closed issue about IV support and I can see from this code that IV is supported... But with a fixed IV, isn't it?
I mean, what usually happens is:
Is this doable?
Thanks a lot...
Hi Gurpratap,
My app crashing for below line
NSData *encryptedData = [[message dataUsingEncoding:NSUTF8StringEncoding] AES256EncryptedDataUsingKey:[[password dataUsingEncoding:NSUTF8StringEncoding] SHA256Hash] error:nil];
with exception
-[NSConcreteMutableData SHA256Hash]: unrecognized selector sent to instance
Hi guys, the project works perfectly but I noticed one bit issue.
When someone encrypts one and the same plaintext will get one and the same cyphertext. This means that if someone listens in the middle - the bad Eve she will be able to guess what has been sent.
Normally the password will never change for an application and I assume that this could be used to encrypt url requests for example - small length of strings. In such use I do not think that is secure enough.
What should be done is to introduce salt - random length. Something which is done in C# here: http://www.obviex.com/samples/encryptionwithsalt.aspx
I need that for a personal project and need to encrypt and decrypt this random cyphertext in iOS app and on web server with C#. Will try to implement that in objective-c and contribute if possible to your project.
Hi,
I have a string that I want to decode: U2FsdGVkX1+MEhsbofUNj58m+8tu9ifAKRiY/Zf8YIw= and I have this key: 3841b8485cd155d932a2d601b8cee2ec .
I can't decrypt the string using AESCrypt-ObjC
Are there any more details that I should be aware about the encryption?
Thank you,
George
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.