Skip to content

FKSecureStore is a helper for keeping data secured in the keychain. Here we try to reduce your time with a quick solution to store your private/secure information with simple steps. It is much simpler to use, like using UserDefault to store/fetch data. We also support storing custom data by encoding/decoding model. I hope this will help you and …

License

Notifications You must be signed in to change notification settings

idevelopers-in/FKSecureStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FKSecureStore

Using the Security framework is tedious. But at times, we need to utilize the keychain to do simple operations such as save and load sensitive data, user credentials for example. This library is a lightweight solution for the same.

Installation

Simply drop FKSecureStore.swift in your project and you're good to go.

Usage

@objc class func save(string: String, key: String) -> Status

Save a string for a particular key in the keychain.

@objc class func save(data: Data, key: String) -> Status

Save any data object for a particular key in the keychain. If you have custom classes, they should conform to NSCoding or (optionally) NSSecureCoding.

@objc class func load(key: String) -> String?

Retrieve a saved string for a particular key in the keychain.

@objc class func load(dataForKey key: String) -> Data?

Retrieve any saved data for a particular key in the keychain.

@objc class func delete(key: String) -> Status

Delete any saved data for a particular key in the keychain.

@objc class func clear() -> Status

Delete all saved data for the app in the keychain. All data for any key you might have saved will be deleted.

Note

Saved data will persist in keychain even after application is deleted or device is restarted.

To-do

  • Option to clear keychain data if app is uninstalled. Might help?

License

FKSecureStore is available under the MIT license. See the LICENSE file for more info.

About

FKSecureStore is a helper for keeping data secured in the keychain. Here we try to reduce your time with a quick solution to store your private/secure information with simple steps. It is much simpler to use, like using UserDefault to store/fetch data. We also support storing custom data by encoding/decoding model. I hope this will help you and …

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages