Encrypt your PDF files

Welcome to the Encryption files guide. This guide will teach you how to Encrypt your files uploaded to the server for additional file protection, easily.

In iLovePDF API all files are always transmitted encrypted via SSL but for those developers who need an additional layer of security, iLovePDF API offers functions to store the files always encrypted in our servers. This way, files will pass through the server encrypted all the time and the only moment they will remain unencrypted will be while they are processed.

Setting encryption to files

Encrypting files is easy and can be set with the function setFileEncryption() just after creating a new task:

Download the PHP library from GitHub
Download the Ruby library from GitHub
Download the .Net library from GitHub

setFileEncryption(true) will encrypt the uploaded file with an automatically given file encryption key of 32 chars. That means that nobody can have access to your files without knowing your file Encryption Key.

Alternatively, you can provide your own file encryption key like this:

Download the PHP library from GitHub
Download the Ruby library from GitHub
Download the .Net library from GitHub

It is important to note that file encryption key must be a string of 16, 24, or 32 chars. Any string out of this values will return as result an error of setFileEncryption().