• This repository has been archived on 09/Jan/2018
  • Stars
    star
    783
  • Rank 58,097 (Top 2 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 12 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple and opinionated AES encrypt / decrypt Objective-C class that just works.

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.

More Repositories

1

aescrypt

A simple and opinionated AES encrypt / decrypt Ruby gem that just works.
Ruby
158
star
2

statemachine-go

๐Ÿšฆ Declarative Finite-State Machines in Go
Go
70
star
3

GSTwitPicEngine

Objective C wrapper around TwitPic's OAuth and OAuth Echo API with OAuthConsumer Lib. Deprecated.
Objective-C
56
star
4

logrus-stack

Adds stack trace to github.com/sirupsen/logrus #golang
Go
55
star
5

Cheapjack

Written in Swift, Cheapjack is a download manager providing an interface over NSURLSessionDownloadTask for managing multiple, simultaneous downloads with easier control over resuming, etc.
Swift
51
star
6

async

Simple async/await futures in Go
Go
28
star
7

vagrant-kubernetes-setup

Vagrant setup for Kubernetes on CoreOS
Ruby
19
star
8

storekit-go

๐Ÿงพ StoreKit API client for verifying in-app purchase receipts with Apple's App Store
Go
18
star
9

Swifter-Reverse-Auth

Twitter Reverse Auth extension for Swifter on iOS and OS X
Swift
16
star
10

OARequestHeader

A quickie to generate OAuth headers when using OAuthConsumer library in Mac and iPhone apps.
Objective-C
14
star
11

drupal-notifier

Drupal Notifier brings update notifications from your Drupal based website to your desktop.
Objective-C
10
star
12

cognizant

Cognizant is a process management framework inspired from God and Bluepill.
Ruby
7
star
13

flat_pill_button

Flat Pill Button for RubyMotion, as seen in Letterpress game for iOS
Ruby
6
star
14

echo-grpc-swift

Example gRPC server (Go) + iOS client (Swift) project for gRPC issues
C
4
star
15

GSFormDataRequest

Cocoa and Cocoa Touch's class to provide a convenient wrapper around NSURLRequest to build multipart forms quickly for POST requests. Deprecated.
Objective-C
3
star
16

GSHTTPRequest

Cocoa and Cocoa Touch class to handle twined NSURLConnection delegate routing and provides easy to implement delegate methods. Deprecated.
Objective-C
2
star
17

g15-gmail-notifier

Python script for interactive Gmail notifications on Logitech G15 Keyboard's screen.
2
star
18

jakiro

Facilitates use of single function for handling requests from http, websocket and other mediums
Go
2
star
19

lifecycle-go

๐Ÿšด๐Ÿปโ€โ™‚๏ธ A complete application runtime framework for your Go apps
Go
2
star
20

user_relationships_invites

Drupal module to automatically create a relationship for invited users (from invite module) when they register.
PHP
1
star
21

redis-build

Package redis with busybox using Docker
Shell
1
star
22

user_relationships_services

Drupal module to expose methods to create, maintain, destroy user relationships, to the services module.
PHP
1
star
23

safer-go

Safer Optional<T> types in Go.
Go
1
star
24

urbanairship-to-pushwoosh

Export device tokens from UrbanAirship and import into PushWoosh account
Go
1
star
25

FreeStreamerSeekTest

FreeStreamer seek issue demonstration
Swift
1
star
26

fadeTransition

A simple jQuery plugin for fade transition between two HTML elements (img, div, etc.).
1
star
27

guestbook-example

Kubernetes Guestbook example in Go. Now merged into Kubernetes and maintained there.
Go
1
star