Setup PureKit

This guide is the first step to adding password-hardened encryption to your solution. Here you can learn how to set up PureKit at your backend to protect your users's passwords and data.

For more details about password-hardened encryption (PHE), take a look at our overview here.

Before you begin

Install PureKit

Use your package manager to install PureKit at your backend.

The PureKit Kotlin/Java is provided as a package named purekit with group id named com.virgilsecurity. You can either use Gradle or Maven to add it to your project dependencies.

Maven Add jcenter repository:


and add purekit dependency:



Add jcenter repository:

repositories {

and add purekit dependency:

implementation 'com.virgilsecurity:purekit:<latest-version>'

The <latest-version> of the SDK can be found in the Maven Central Repository:

Initialize PureKit

Use the previously generated credentials to configure PureKit:

PureContext context = PureContext.createContext(

Pure pure = new Pure(context);

If you want to use your own custom storage instead of Virgil Cloud for storing encryption keys and user records - for example, if you need a better performance - you'll need to go through the Set Up Custom Storage guide.

Next step

Now that you have PureKit installed and configured, you can move on to encrypting users' passwords as a part of user authentication: