Skip to content

theosementa/KeychainKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

KeychainKit

A Swift package that simplifies secure data storage using the Keychain

How to use?

import KeychaintKit

Conform an enum to KeychainKey

enum KeychainKeys: String, KeychainKey {
    case refreshToken
}

Use the class KeychainService

/// Set item in Keychain
let refreshToken: String = "jR4QBvxK468Q9VqUrqoV96RQEVjflfBkaEv62Dea"
KeychainService.setItem(key: KeychainKeys.refreshToken, data: refreshToken)
/// Get item from Keychain
let data = KeychainService.getItem(key: KeychainKeys.refreshToken, type: String.self)
/// Delete item in Keychain
KeychainService.deleteItem(key: KeychainKeys.refreshToken)

Credits

Handmade by Théo Sementa

About

A Swift package that simplifies secure data storage using the Keychain

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages