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.