From 02d309eae4fffc15b9196e55b4d35208b6d6bb76 Mon Sep 17 00:00:00 2001 From: Marcus Kida Date: Tue, 25 Jan 2022 11:39:53 +0100 Subject: [PATCH] Update README --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d927e36..38ccd97 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ # KeychainWrapper -A description of this package. +A very simple wrapper around the iOS keychain. + +## Usage + +First instantiate `KeychainWrapper`, then use the instance to create, read or delete keychain entries, e.g.: + +```swift +let keychainWrapper = KeychainWrapper(service: "myApp") + +// store password <-> username mapping for service "myApp" +keychainWrapper["username"] = "secretPassword" + +// retrieve password for username +let password = keychainWrapper["username"] + +// delete password entry for username in service "myApp" +keychainWrapper["username"] = nil +``` + +## License + +See [LICENSE.md](LICENSE.md).