realm-encryption-helper

A lightweight library for generate encrypt key and save to KeyStore for Realm

Лицензия

Лицензия

Категории

Категории

Realm Данные Базы данных
Группа

Группа

com.github.tntkhang
Идентификатор

Идентификатор

realm-encryption-helper
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

aar
Описание

Описание

realm-encryption-helper
A lightweight library for generate encrypt key and save to KeyStore for Realm
Ссылка на сайт

Ссылка на сайт

https://github.com/tntkhang/realm-encryption-helper
Система контроля версий

Система контроля версий

https://github.com/tntkhang/realm-encryption-helper

Скачать realm-encryption-helper

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.tntkhang/realm-encryption-helper/ -->
<dependency>
    <groupId>com.github.tntkhang</groupId>
    <artifactId>realm-encryption-helper</artifactId>
    <version>1.0.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.tntkhang/realm-encryption-helper/
implementation 'com.github.tntkhang:realm-encryption-helper:1.0.0'
// https://jarcasting.com/artifacts/com.github.tntkhang/realm-encryption-helper/
implementation ("com.github.tntkhang:realm-encryption-helper:1.0.0")
'com.github.tntkhang:realm-encryption-helper:aar:1.0.0'
<dependency org="com.github.tntkhang" name="realm-encryption-helper" rev="1.0.0">
  <artifact name="realm-encryption-helper" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.tntkhang', module='realm-encryption-helper', version='1.0.0')
)
libraryDependencies += "com.github.tntkhang" % "realm-encryption-helper" % "1.0.0"
[com.github.tntkhang/realm-encryption-helper "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

realm-encryption-helper

Android Arsenal

Download

This is a lightweight library to generate a 64-bit random key and using AES Algorithm to encrypt/decrypt that random number to get a Secret Key and save it to Key Store.

This library especially supports for Realm Encryption. That means when using you don't have to care about how to get a random key, where to save that key for safe,... this library will take it.

Support all android version

Setup and using

  1. Add library to your build.gradle in app level
implementation 'com.github.tntkhang:realm-encryption-helper:1.0.2'

2.In your CustomeApplication where you init your Realm

// Config RealmEncryptionHelper
RealmEncryptionHelper realmEncryptionHelper = RealmEncryptionHelper.initHelper(this, getString(R.string.app_name));

// Config Realm
Realm.init(this);
RealmConfiguration config = new RealmConfiguration.Builder()
         .name("realm_encrypt.realm")
         .encryptionKey(realmEncryptionHelper.getEncryptKey()) // Call realmEncryptionHelper to get encrypt key
         .build();
 Realm.setDefaultConfiguration(config);

with this code

realmEncryptionHelper.getEncryptKey()

The library will check and generate a new key if your app doesn't contain the key in Key Store before and then save it to Key Store, otherwise, it will be got from Key Store.

DEMO

Download and run project for simple demo

That is, let's enjoy!

Версии библиотеки

Версия
1.0.0