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

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.