Keystore ultimate

The ultimate solution for Android keystore manipulation

License

License

Categories

Categories

KeY Data Data Formats Formal Verification
GroupId

GroupId

com.github.leonardoxh
ArtifactId

ArtifactId

keystore-ultimate
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

aar
Description

Description

Keystore ultimate
The ultimate solution for Android keystore manipulation
Project URL

Project URL

https://github.com/leonardoxh/keystore-ultimate
Source Code Management

Source Code Management

https://github.com/leonardoxh/keystore-ultimate

Download keystore-ultimate

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Android Arsenal

Keystore Ultimate

The ultimate solution for keystore manipulation in Android

Tired of deal with Android keystore? A lot of code ever? This library is for you

This library is tiny (no dependencies) just to small implementations to store/retrieve keystore values it automatically deals with old Android keystore implementation (pre api 23) and newer Android keystore

Usage:

//Just get a instance of the CipherStorage
CipherStorage cipherStorage = CipherStorageFactory.newInstance(context);
//Then you can use the encrypt and decrypt method

Gradle dependency:

implementation 'com.github.leonardoxh:keystore-ultimate:1.3.0'

...Unit tests?

  • I care a lot about unit tests, and since this library touch on the Android Keystore making it almost impossible to test, but, I said "almost" that's why I provide another library just for tests, if you wanna use mockito when...then it's fine but I think this is not your responsability so just add this into your test implementation and that's it, the CipherStorageFactory will return a in memory implementation just for tests you don't need change anything on your source code:
testImplementation 'com.github.leonardoxh:keystore-ultimate-test:1.3.0'

Where the encrypted values are stored?

  • By default the encrypted values are stored in an android shared preferences, but you can always pass your own implementation of the Storage interface and store it where you want, on a SQLite for example.

Library usage?

  • Did you use this library? Please notify me via email [email protected] I would love to receive feedbacks and see if this library is used in some project and if it's helping somehow.

Inspiration:

Limitations:

  • On Api level 22 and bellow your alias for key should not contain more than 256 bytes otherwise we can't save the the value due a limitation on the Android Keystore

Special thanks:

  • Zularizal for this amazing library logo and sample icons

LICENSE:

Copyright 2018 Leonardo Rossetto

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.

Versions

Version
1.3.0
1.2.1
1.2.0
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0