Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felipejfc/owl
Secure Simple Key-Value Storage for iOS
https://github.com/felipejfc/owl
Last synced: 3 days ago
JSON representation
Secure Simple Key-Value Storage for iOS
- Host: GitHub
- URL: https://github.com/felipejfc/owl
- Owner: felipejfc
- License: other
- Created: 2015-02-24T03:15:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-02-27T03:10:30.000Z (over 9 years ago)
- Last Synced: 2024-10-12T02:17:14.777Z (about 1 month ago)
- Language: Objective-C
- Size: 679 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](http://img.shields.io/cocoapods/p/Owl.svg?style=flat)
![](http://img.shields.io/cocoapods/v/Owl.svg?style=flat)
![](http://img.shields.io/cocoapods/l/Owl.svg?style=flat)
[![](https://travis-ci.org/felipejfc/owl.svg?branch=master)](https://travis-ci.org/felipejfc/owl/builds)
[![Join the chat at https://gitter.im/felipejfc/owl](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/felipejfc/owl?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)#Owl
Secure, simple key-value storage for iOS
Owl uses:
- RNCryptor (AES) for the crypto
- NSUserDefaults for the persistent storage
- AutoCoding
- GZIP for compressionOwl provides:
- Secure data persistence
- Save any object that subclasses NSObject### Using Owl
###Add pod
```groovy
pod 'Owl'
```###Import Owl
```#import "Owl.h"```#### Save
```objective-c
[Owl putObject:object withKey:@"key"];
```#### Get
```objective-c
T * object = [Owl getObjectWithKey:@"key"];
```#### Remove
```objective-c
[Owl removeObjectWithKey:@"key"]
```#### Contains
```objective-c
BOOL ret = [Owl containsKey:@"key"];
```##### More samples for save
```objective-c
[Owl putObject:[NSArray arrayWithObjects:object1, object2,...] withKey:@"a"]; //save array
[Owl putObject:@"Hello" withKey:@"b"]; //save string
[Owl putObject:[NSNumber numberWithInt:1] withKey:@"c"]; //save number
[Owl putObject:[[Foo alloc] init] withKey:@"d"]; //save an object
```##### More samples for get
```objective-c
NSArray * value = [Owl getObjectWithKey:@"a"]; //load array
NSString * value = [Owl getObjectWithKey:@"b"]; //load string
NSNumber * value = [Owl getObjectWithKey:@"c"]; //load number
Foo * value = [Owl getObjectWithKey:@"d"]; //load an object
```###Encryption / Security
Owl uses AES encryption over the data to save it securely, all the security methods are written in
pure C so that it is way harder to intercept/crack them.###Compatibility
Owl can persist **everything that subclasses NSObject**, assuming that all the properties of
this object also do or are primitives.
You should only avoid using structs that are not already NSCoding-compliant via NSValue.###MIT License
Copyright (c) 2015 Felipe CavalcantiPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.