{"id":13536756,"url":"https://github.com/Liftric/KVault","last_synced_at":"2025-04-02T03:31:03.811Z","repository":{"id":37866193,"uuid":"279557202","full_name":"Liftric/KVault","owner":"Liftric","description":"Secure key-value storage for Kotlin Multiplatform projects.","archived":false,"fork":false,"pushed_at":"2024-06-07T12:23:49.000Z","size":316,"stargazers_count":272,"open_issues_count":7,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T08:18:25.318Z","etag":null,"topics":["android","encrypted-sharedpreferences","ios","key-value-store","keychain","keychain-wrapper","kotlin","kotlin-multiplatform","kotlin-native","liftric","secure-key-storage","sharedpreferences","storage"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Liftric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-14T10:42:53.000Z","updated_at":"2025-03-24T11:40:06.000Z","dependencies_parsed_at":"2023-10-11T22:06:38.917Z","dependency_job_id":"422e2a3a-ed37-4ab3-8ab1-c37d47ea98df","html_url":"https://github.com/Liftric/KVault","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2FKVault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2FKVault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2FKVault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Liftric%2FKVault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Liftric","download_url":"https://codeload.github.com/Liftric/KVault/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246751020,"owners_count":20827818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","encrypted-sharedpreferences","ios","key-value-store","keychain","keychain-wrapper","kotlin","kotlin-multiplatform","kotlin-native","liftric","secure-key-storage","sharedpreferences","storage"],"created_at":"2024-08-01T09:00:48.910Z","updated_at":"2025-04-02T03:31:03.248Z","avatar_url":"https://github.com/Liftric.png","language":"Kotlin","funding_links":[],"categories":["Libraries","数据库","Database"],"sub_categories":["Storage","📦 Storage"],"readme":"![CI](https://github.com/Liftric/kvault/workflows/CI/badge.svg) ![maven-central](https://img.shields.io/maven-central/v/com.liftric/kvault?label=Maven%20Central) ![OSS Sonatype (Releases)](https://img.shields.io/nexus/r/com.liftric/kvault?label=Sonatype%20OSSRH%20%28Releases%29\u0026server=https%3A%2F%2Fs01.oss.sonatype.org)\n\n\n# KVault\n\nKVault is a secure key-value storage for Kotlin Multiplatform projects. It acts as an iOS Keychain wrapper and implements encrypted SharedPreferences for Android.\n\n## Import\n\n```kotlin\nsourceSets {\n    val commonMain by getting {\n        dependencies {\n            implementation(\"com.liftric:kvault:\u003cversion\u003e\")\n        }\n    }\n}\n```\n\n## How-to\n\n### Init\n\n#### Android\n\n```kotlin\nval store = KVault(context, \"\u003cfileName\u003e\")\n```\n\n| Parameter           | Description                         |\n| :------------------ | :---------------------------------- |\n| fileName (optional) | Name of the shared preferences file |\n\n#### iOS\n\n```kotlin\nval store = KVault(\"\u003cserviceName\u003e\", \"\u003caccessGroup\u003e\")\n```\n\n| Parameter              | Description                         |\n| :--------------------- | :---------------------------------- |\n| serviceName (optional) | Used to categories objects          |\n| accessGroup (optional) | Used to share objects between apps  |\n\n### Setting\n\n```kotlin\nval stringStored: Boolean = store.set(key = \"LEET\", stringValue = \"1337\")\nval intStored: Boolean = store.set(key = \"ANSWER\", intValue = 42)\nval floatStored: Boolean = store.set(key = \"PI\", floatValue = 3.14)\n```\n\n#### Supported Types\n\n- String\n- Int\n- Long\n- Float\n- Double\n- Bool\n- ByteArray\n\n### Getting\n\n```kotlin\nval stringValue: String? = store.string(forKey = \"PASSWORD\")\nval intValue: Int? = store.int(forKey = \"SECRET\")\n```\n\nTo check if an object is stored you can use:\n\n```kotlin\nval existsObject: Boolean = store.existsObject(forKey = \"PASSWORD\")\n```\n\nTo check for which keys objects are stored:\n\n```kotlin\nval allKeys: List\u003cString\u003e = store.allKeys()\n```\n\n### Deleting\n\n#### Single object\n\n```kotlin\nval isRemoved: Boolean = store.removeObject(forKey = \"PASSWORD\")\n```\n\n#### All objects\n\n```kotlin\nval isCleared: Boolean = store.clear()\n```\n\n## License\n\nKVault is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiftric%2FKVault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLiftric%2FKVault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLiftric%2FKVault/lists"}