Ray Zhang db206cd873 160106 10 жил өмнө
..
Base.lproj 9bc09bb3b4 160106 10 жил өмнө
Images.xcassets a36a6580f3 160106 10 жил өмнө
en.lproj 03dff839df 425 12 жил өмнө
zh-Hans.lproj 9bc09bb3b4 160106 10 жил өмнө
AESCrypt.h e9965cb4b5 header ver 12 жил өмнө
AESCrypt.m e9965cb4b5 header ver 12 жил өмнө
Apex Mobile-Info.plist db206cd873 160106 10 жил өмнө
Apex Mobile-Prefix.pch 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
ApexHistoryViewController.h 66138c8ec6 0504 12 жил өмнө
ApexHistoryViewController.m 582d711d20 2014514 12 жил өмнө
ApexMobileAppDelegate.h 03dff839df 425 12 жил өмнө
ApexMobileAppDelegate.m 9bc09bb3b4 160106 10 жил өмнө
ApexMobileDB.h 582d711d20 2014514 12 жил өмнө
ApexMobileDB.m 582d711d20 2014514 12 жил өмнө
ApexMobileFirstViewController.h 85bfb448cd 20140515 12 жил өмнө
ApexMobileFirstViewController.m 85bfb448cd 20140515 12 жил өмнө
ApexMobileNavigationController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
ApexMobileNavigationController.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
ApexMobileNetwork.h 9bc09bb3b4 160106 10 жил өмнө
ApexMobileNetwork.m f77c7ea659 2015/05/04 11 жил өмнө
ApexMobileSecondViewController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
ApexMobileSecondViewController.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
CellItemHistory.h 66138c8ec6 0504 12 жил өмнө
CellItemHistory.m 66138c8ec6 0504 12 жил өмнө
ChangePasswordViewController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
ChangePasswordViewController.m 85bfb448cd 20140515 12 жил өмнө
Constant.h 85bfb448cd 20140515 12 жил өмнө
Constant.m 85bfb448cd 20140515 12 жил өмнө
CustomizeFieldViewController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
CustomizeFieldViewController.m e293fa72d6 160106 10 жил өмнө
DetailCellKV.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailCellKV.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailCellList.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailCellList.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailCellWeb.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailCellWeb.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailContent.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailContent.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailPageViewController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
DetailPageViewController.m fd552bdd0e 20151203 10 жил өмнө
DetailTabBarController.h 66138c8ec6 0504 12 жил өмнө
DetailTabBarController.m 85bfb448cd 20140515 12 жил өмнө
DocumentsViewController.h 582d711d20 2014514 12 жил өмнө
DocumentsViewController.m 582d711d20 2014514 12 жил өмнө
FavoritesData.h 66138c8ec6 0504 12 жил өмнө
FavoritesData.m 66138c8ec6 0504 12 жил өмнө
FunctionSelectViewController.h 582d711d20 2014514 12 жил өмнө
FunctionSelectViewController.m 202e3401bc 0519 12 жил өмнө
HistoryData.h 66138c8ec6 0504 12 жил өмнө
HistoryData.m 66138c8ec6 0504 12 жил өмнө
HistoryTabBarController.h 66138c8ec6 0504 12 жил өмнө
HistoryTabBarController.m 582d711d20 2014514 12 жил өмнө
HistoryViewController.h 66138c8ec6 0504 12 жил өмнө
HistoryViewController.m 582d711d20 2014514 12 жил өмнө
LICENSE e9965cb4b5 header ver 12 жил өмнө
LineView.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
LineView.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
LocalDocumentsViewController.h 85bfb448cd 20140515 12 жил өмнө
LocalDocumentsViewController.m 582d711d20 2014514 12 жил өмнө
LocationDetailViewController.h 582d711d20 2014514 12 жил өмнө
LocationDetailViewController.m 582d711d20 2014514 12 жил өмнө
LocationViewController.h 85bfb448cd 20140515 12 жил өмнө
LocationViewController.m 85bfb448cd 20140515 12 жил өмнө
MessageDetailItem.h 582d711d20 2014514 12 жил өмнө
MessageDetailItem.m 582d711d20 2014514 12 жил өмнө
MessageDetailViewController.h 202e3401bc 0519 12 жил өмнө
MessageDetailViewController.m cbe2c1271f 2015/05/04 11 жил өмнө
MessageItem.h 582d711d20 2014514 12 жил өмнө
MessageItem.m 582d711d20 2014514 12 жил өмнө
MessageViewController.h 582d711d20 2014514 12 жил өмнө
MessageViewController.m 202e3401bc 0519 12 жил өмнө
MyAutocompleteItemsSource.h 582d711d20 2014514 12 жил өмнө
MyAutocompleteItemsSource.m 582d711d20 2014514 12 жил өмнө
MyAutocompleteView.h 582d711d20 2014514 12 жил өмнө
MyAutocompleteView.m 582d711d20 2014514 12 жил өмнө
MyAutocompletionCellFactory.h 66138c8ec6 0504 12 жил өмнө
MyAutocompletionCellFactory.m 66138c8ec6 0504 12 жил өмнө
MySuggestion.h 66138c8ec6 0504 12 жил өмнө
MySuggestion.m 66138c8ec6 0504 12 жил өмнө
NSData+Base64.h e9965cb4b5 header ver 12 жил өмнө
NSData+Base64.m e9965cb4b5 header ver 12 жил өмнө
NSData+CommonCrypto.h e9965cb4b5 header ver 12 жил өмнө
NSData+CommonCrypto.m e9965cb4b5 header ver 12 жил өмнө
NSString+Base64.h e9965cb4b5 header ver 12 жил өмнө
NSString+Base64.m e9965cb4b5 header ver 12 жил өмнө
NewsData.h 66138c8ec6 0504 12 жил өмнө
NewsData.m 66138c8ec6 0504 12 жил өмнө
NewsDetailViewController.h 582d711d20 2014514 12 жил өмнө
NewsDetailViewController.m 582d711d20 2014514 12 жил өмнө
NewsTableViewCell.h 66138c8ec6 0504 12 жил өмнө
NewsTableViewCell.m 66138c8ec6 0504 12 жил өмнө
NewsViewController.h 66138c8ec6 0504 12 жил өмнө
NewsViewController.m 85bfb448cd 20140515 12 жил өмнө
PageData.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
PageData.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
PdfViewController.h 582d711d20 2014514 12 жил өмнө
PdfViewController.m 582d711d20 2014514 12 жил өмнө
PulldownMenu.h 66138c8ec6 0504 12 жил өмнө
PulldownMenu.m 66138c8ec6 0504 12 жил өмнө
README.md e9965cb4b5 header ver 12 жил өмнө
RTLabel.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
RTLabel.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
Reachability.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
Reachability.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
ResultViewController.h 66138c8ec6 0504 12 жил өмнө
ResultViewController.m 85bfb448cd 20140515 12 жил өмнө
RetrievePasswordViewController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
RetrievePasswordViewController.m 85bfb448cd 20140515 12 жил өмнө
SearchTableAdapter.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
SearchTableAdapter.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
SearchViewController.h 582d711d20 2014514 12 жил өмнө
SearchViewController.m 85bfb448cd 20140515 12 жил өмнө
SimpleGridComponent.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
SimpleGridComponent.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
SimpleGridDataSource.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
SimpleGridDataSource.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
SimpleMenu.h 66138c8ec6 0504 12 жил өмнө
SimpleMenu.m 66138c8ec6 0504 12 жил өмнө
TabBarController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
TabBarController.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
TableCellBool.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
TableCellBool.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
TableCellDate.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
TableCellDate.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
TableCellEdit.h 66138c8ec6 0504 12 жил өмнө
TableCellEdit.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
ToolsPanelViewController.h 66138c8ec6 0504 12 жил өмнө
ToolsPanelViewController.m 582d711d20 2014514 12 жил өмнө
TouchLabel.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
TouchLabel.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
WebViewController.h 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
WebViewController.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
about.htm 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
main.m 29adbd6196 header ver for apex mobile iOS 12 жил өмнө
openurltest.txt 582d711d20 2014514 12 жил өмнө

README.md

AESCrypt-ObjC - Simple AES encryption / decryption for iOS and OS X

AESCrypt is a simple to use, opinionated AES encryption / decryption Objective-C class that just works.

AESCrypt uses the AES-256-CBC cipher and encodes the encrypted data with base64.

A corresponding gem to easily handle AES encryption / decryption in Ruby is available at http://github.com/Gurpartap/aescrypt.

Installation

Add this line to your class:

#import "AESCrypt.h"

Usage

NSString *message = @"top secret message";
NSString *password = @"p4ssw0rd";

Encrypting

NSString *encryptedData = [AESCrypt encrypt:message password:password];

Decrypting

NSString *message = [AESCrypt decrypt:encryptedData password:password];

Common sense

AESCrypt includes Base64 and Crypto extensions for NSData and NSString classes. If you're already using an extension that provides these, there is no need to use the included classes. Change the code in the AESCrypt class to correspond to your existing implementation of these extensions.

Corresponding usage in Ruby

The AESCrypt Ruby gem, available at http://github.com/Gurpartap/aescrypt, understands what you're talking about in your Objective-C code. The purpose of the Ruby gem and Objective-C class is to have something that works out of the box across the server (Ruby) and client (Objective-C). However, a standard encryption technique is implemented, which ensures that you can handle the data with any AES compatible library available across the web. So, you're not locked-in.

Here's how you would use the Ruby gem:

message = "top secret message"
password = "p4ssw0rd"

Encrypting

encrypted_data = AESCrypt.encrypt(message, password)

Decrypting

message = AESCrypt.decrypt(encrypted_data, password)

See the Ruby gem README at http://github.com/Gurpartap/aescrypt for more details.

License

NSData+CommonCrypto is Copyright (c) 2008-2009, Jim Dovey

AESCrypt is Copyright (c) 2012 Gurpartap Singh

See LICENSE for license terms.