All Projects → netguru → Kissme

netguru / Kissme

Licence: apache-2.0
Kissme: Kotlin Secure Storage Multiplatform

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Kissme

Immortaldb
🔩 A relentless key-value store for the browser.
Stars: ✭ 2,962 (+743.87%)
Mutual labels:  storage, key-value, library
Hawk
✔️ Secure, simple key-value storage for Android
Stars: ✭ 3,827 (+990.31%)
Mutual labels:  preferences, storage, encryption
Peergos
A p2p, secure file storage, social network and application protocol
Stars: ✭ 895 (+154.99%)
Mutual labels:  storage, encryption, encrypted
Electron Store
Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc
Stars: ✭ 3,316 (+844.73%)
Mutual labels:  preferences, storage
ProtonClient
An unofficial desktop client for ProtonMail done with electron nativefier
Stars: ✭ 50 (-85.75%)
Mutual labels:  encryption, multiplatform
lethe
Secure drive wipe
Stars: ✭ 47 (-86.61%)
Mutual labels:  storage, secure
Cute headers
Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
Stars: ✭ 3,274 (+832.76%)
Mutual labels:  library, cross-platform
Csconsoleformat
.NET C# library for advanced formatting of console output [Apache]
Stars: ✭ 296 (-15.67%)
Mutual labels:  library, cross-platform
Cosmonaut
🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
Stars: ✭ 309 (-11.97%)
Mutual labels:  storage, library
Structopt
Parse command line arguments by defining a struct
Stars: ✭ 323 (-7.98%)
Mutual labels:  library, cross-platform
Gokv
Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)
Stars: ✭ 314 (-10.54%)
Mutual labels:  key-value, library
Reproc
A cross-platform (C99/C++11) process library
Stars: ✭ 325 (-7.41%)
Mutual labels:  library, cross-platform
drive-mobile
internxt.com
Stars: ✭ 43 (-87.75%)
Mutual labels:  encryption, secure
elara
Elara DB is an easy to use, lightweight key-value database that can also be used as a fast in-memory cache. Manipulate data structures in-memory, encrypt database files and export data. 🎯
Stars: ✭ 93 (-73.5%)
Mutual labels:  key-value, storage
Cloaker
Simple, drag-and-drop, password-based file encryption
Stars: ✭ 267 (-23.93%)
Mutual labels:  cross-platform, encryption
pi-encrypted-boot-ssh
🔑 Raspberry Pi Encrypted Boot with Remote SSH
Stars: ✭ 96 (-72.65%)
Mutual labels:  secure, encrypted
i2pchat
🌀 i2pchat. Anonymous private secure opensource chat using end-to-end encrypted transport.
Stars: ✭ 25 (-92.88%)
Mutual labels:  secure, encrypted
Preferenceroom
🚚 Android processing library for managing SharedPreferences persistence efficiently and structurally.
Stars: ✭ 341 (-2.85%)
Mutual labels:  preferences, storage
encrypted-smiley-secure-protocol
Node.JS library Encrypted Smiley ® Secure Protocol (eSSP, SSP)
Stars: ✭ 22 (-93.73%)
Mutual labels:  secure, encrypted
infinitree
Scalable and encrypted embedded database with 3-tier caching
Stars: ✭ 80 (-77.21%)
Mutual labels:  encryption, storage

Kissme: Kotlin Secure Storage Multiplatform

Android Arsenal Build Status

Kissme is an open-source library providing encrypted key-value storage.

It can be integrated seamlessly in Kotlin projects built with Kotlin Multiplatform, Kotlin/Native, and Kotlin Android plugins.

Kissme allows storing key-value data in common code modules without any additional boilerplate code.

Currently library supports the following platforms:

  • Android (API >= 23)
  • iOS (ios_arm64 and ios_x64 targets)

Download

To use this library in your project, add Netguru and Binryprefs maven urls to the repositories block:

repositories {
    maven {  url 'https://dl.bintray.com/netguru/maven/' }
    maven { url "https://jitpack.io" }
}

Then add following dependencies to the common module build.gradle:

    sourceSets {
        commonMain {
            dependencies {
                implementation 'com.netguru.kissme:common:0.2.5'     
            }
        }
        androidMain {
            dependencies {
                implementation 'com.netguru.kissme:android:0.2.5'
            }
        }
        iosMain {
            dependencies {
                implementation 'com.netguru.kissme:ios:0.2.5'
            }
        }
    }

Remember to enable GRADLE_METADATA in settings.gradle:

enableFeaturePreview('GRADLE_METADATA')

Usage

Just start with creating an instance of Kissme class somewhere in your common module and enjoy! It's as simple as that. You don't have to initialize it by yourself nor to pass Android Context. Everything is done automatically.

val storage = Kissme(name = "my_secret_storage")

The name parameter is optional. You can omit it if you want to use default storage. Kissme allows you to store and persist multiple data types:

  • String
  • Int
  • Long
  • Float
  • Double
  • Boolean

If you want to store something, just call:

storage.putString(key = "someKey", value = "value")

If you want to get stored value - use:

storage.getString(key = "someKey", defaultValue = "default")

All get() functions will return defaultValue parameter if storage doesn't contain selected key.

You can get all keys stored in Kissme storage by calling:

storage.getAll()

You can check if Kissme storage contains selected key by calling:

storage.contains(key = "someKey")

You can also remove selected key from storage:

storage.remove(key = "someKey")

Last, but not least, you can remove all data stored in Kissme storage:

storage.clear()

About

Kissme allows to store key-value pairs in platform-specific way securely.

Android

Android implementation uses binaryprefs library under the hood in order to provide a robust key-value storage mechanism. The keys and values are encrypted using XOR and AES encryption accordingly. The data encryption and encryption keys storing generating mechanisms are fully automated and is applied to the stored data by default. All the encryption keys are stored in the Android KeyStore.

In order to acquire the application Context instance required for data storing operations the library registers an internal ContentProvider.

iOS

The iOS implementation is using native iOS Keychain. The Secure Enclave is a hardware-based key manager that's isolated from processor. It allows you to store, delete, fetch passwords and accounts. Keychain is simple wrapper build upon Security interface to store, save, and fetch not only passwords, but also accounts.

Running sample app

Sample app uses Maven Local for resolving Kissme dependencies. Before running sample app you need to:

  1. Build the library - ./gradlew build
  2. Publish dependencies to Maven Local - ./gradlew publishToMavenLocal
  3. Run selected library. If you want to run iOS app - you need to properly configure Xcode. Please check: https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html#setting-up-xcode before running iOS sample app.

Development roadmap

  1. Configure integration tests on iOS
  2. Add CI
  3. Add support for Android API < 23
  4. Automate KeychainWrapper framework generation
  5. Migrate to kotlin-multiplatform Gradle plugin
  6. Clean up .pom dependencies declarations
  7. Add experimental JavaScript support - call for ideas

Kissme is an open source project developed and maintained by Kotlin community. Feel free to contribute to the project.

License

Copyright 2018 Netguru

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].