Importing Virgil Key
This guide shows how to export a Virgil KeyThe Virgil Key is a wrapper of the user's secure Private Key more ... from a Base64 encoded string representation.
Set up your project environment before you begin to import a Virgil Key, with the getting started guide.
In order to import a Virgil Key, we need to:
- Initialize Virgil SDKThe SDK helps take tedious complexity out of coding by providing APIs for all of Virgil Services.
VirgilApi virgil = new VirgilApiImpl();
- Choose a Base64 encoded string
- Import the Virgil Key from the Base64 encoded string
// initialize a buffer from base64 encoded string
VirgilBuffer aliceKeyBuffer = VirgilBuffer.from("[BASE64_ENCODED_VIRGIL_KEY]",
// import Virgil Key from buffer
VirgilKey aliceKey = virgil.getKeys().importKey(aliceKeyBuffer,