Owl 1.46

Owl 1.46

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2015年2月

Felipe Cavalcanti 维护。



 
依赖项
RNCryptor>= 0
GZIP>= 0
 

Owl 1.46

  • Felipe Cavalcanti

针对 iOS 的安全简单的键值存储

Owl 使用

  • RNCryptor (AES) 进行加密
  • NSUserDefaults 进行持久化存储
  • 自动编码
  • gzip 进行压缩

Owl 提供

  • 安全数据持久化
  • 保存任何子类为 NSObject 的对象

使用 Owl

添加 pod

pod 'Owl'

导入 Owl

#import "Owl.h"

保存

[Owl putObject:object withKey:@"key"];

获取

T * object = [Owl getObjectWithKey:@"key"];

删除

[Owl removeObjectWithKey:@"key"]

包含

BOOL ret = [Owl containsKey:@"key"];
保存的更多示例
[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
获取的更多示例
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

加密/安全

Owl 在保存数据时会使用 AES 加密以安全地保存,所有安全方法都是用纯 C 编写的,这使得拦截/破解它们更加困难。

兼容性

Owl 可以持久化 任何子类为 NSObject 的对象,假设该对象的所有属性也都是或为原语。您应该仅避免使用未通过 NSValue 符合 NSCoding 的结构体。

MIT 许可证

Copyright (c) 2015 Felipe Cavalcanti

Permission 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.