Protect, Track & Control Data.
Anywhere. Anytime.

Get started in JavaScript, Node.js, Python, or C++.

Client-side JS Decryption

After authenticating, you can decrypt a file with just a few lines of code:

<!DOCTYPE html>
    <title>Virtru SDK for JavaScript - Sample Application</title>
    <link href="" rel="stylesheet"/>
    <script src=""></script>
    <script src=""></script>

  <div id="virtru-auth-widget-mount"></div>
  <script type="text/javascript">
    async function afterAuth(email) {
      // Run all client code from here. 
      // This will only be called when the user is successfully authenticated.
      const client = new Virtru.Client({email});      
      const decryptParams = new Virtru.DecryptParamsBuilder()
      stream = await client.decrypt(decryptParams);
      await stream.toFile('/tmp/statement.pdf');
    // Set up the auth widget.
    Virtru.AuthWidget('virtru-auth-widget-mount', {afterAuth});

You (or your app's users) can also decrypt files using Virtru's Secure Reader.

Decrypting Watermarked Files

Please note that watermarked files cannot be decrypted using the Virtru SDK. You or your end users can still decrypt files using the Virtru Secure Reader.

Updated 14 days ago

Client-side JS Decryption

Suggested Edits are limited on API Reference Pages

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