Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.


For information on how to use the Security library in your app or library, see Security Overview.

Latest Update Current Stable Release Next Release Candidate Beta Release Alpha Release
May 23, 2019 - - - 1.0.0-alpha02

Declaring dependencies

To add a dependency on Security, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

dependencies {
    def security_version = "1.0.0-alpha02"
    implementation "$security_version"

For more information about dependencies, see Add build dependencies.

Version 1.0.0

Version 1.0.0-alpha02

May 23, 2019 is released. The commits included in this version can be found in this commit log.

Bug fixes

  • Fixed issue retrieving key/values associated with shared preferences from getAll().
  • Blocked usage of restricted preference keys.
  • Minor Javadoc updates.

Version 1.0.0-alpha01

May 7, 2019 is released. The commits included in this version can be found here.

New feature highlights

  • EncryptedFile, provides encrypted input and output streams to read/write encrypted data to a File.
  • EncryptedSharedPreferences, provides an implementation of SharedPreferences that automatically encrypts/decrypts all keys and values.
  • Provides simple key generation via MasterKeys.