Build with the Virtru Developer Hub

It's Your Data. Protect It. Control It. Everywhere.

Try the Demo          Learn More     

Encrypt & Decrypt

Before we dive into the Virtru SDK's features, head over to the Live Drag and Drop Demo to check out a live example. With this fully hosted demo, you won't need to worry about any setup.

The objectives of this Drag and Drop Demo are to show how easily one can encrypt and decrypt files using the Virtru SDK and leveraging Virtru's Infrastructure for:

  • Authentication
  • Encryption and Key Management
  • Access Control of the Key

Try it live

You can play around with the demo here to understand how to protect a file. You can also download the source code below.

How to Use the Drag and Drop Demo?

This Drag and Drop demo uses the Virtru SDK for JavaScript. Using the SDK, the Drag and Drop demo application does encryption and decryption on the browser. The clear text file or the encrypted file is not sent to any server. In essence, the Drag and Drop demo is a first step in implementing end-to-end protection for your objects.

Step 1. Authenticate

Enter your email address to authenticate. You can either use Email Code loop or Federated Authentication.

Authenticate to use the demo application.

Authenticate to use the demo application.

Adding Authentication

Check out the How to Add Authentication guide for an authentication deep-dive. Virtru also has a simple authentication widget (currently in Beta) that you can easily embed into your site. Contact Support for more information on the Virtru Auth Widget.

Step 2. Drag & Drop to Protect Files

At this point you can drag a single file, or multiple files, to the encryption region. Once the files are encrypted, the resulting .tdf files will be downloaded to your computer.

The Drag & Drop interface

The Drag & Drop interface

The .tdf file is a fully protected version of the clear text file you uploaded. You are free to store the file in databases or cloud storage solutions.

Split Knowledge Architecture

Virtru does not have access to the clear text or encrypted TDF file, hence ensuring split knowledge.

To decrypt, navigate to the location on your computer where the encrypted (.tdf) file is stored. Select this file and drag it to the decrypt region. The decrypted file will then be downloaded to your computer.

Encryption, Decryption and Controls

Use the following links to learn:

Step 3. Get Started Protecting Data!

That's it! That's how easy it is to protect the data. The following sections on the left-hand navigation walk you through how to implement object-level data encryption that travels with the data using Virtru SDKs.

Encrypt & Decrypt

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.