Output Encryption

Encoding.com's API can encrypt to a variety of native encryption as well as several commercial DRM platforms. For FlashAccess, PlayReady, Widevine, Atlas, or BuyDRM KeyOS CPIX, please see their respective sections in the API documents.

These more generic open-source methods below are supported by all formats except iphone_stream, ipad_stream, advanced_mss, and advanced_dash formats. Those formats have their own encryption implementation, please refer to their documentation on how to use them.

A destination is required when using encryption without specifying a encryption_key or encryption_key_file. The key used for encryption will be uploaded to the same destination as output file, with a .key extension.

<?xml version="1.0"?>
<query>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</userkey> <!-- required-->
    <action>[Action]</action> <!-- required-->
    <format>
        <encryption>[yes|no]</encryption>
        <encryption_method>[aes-128-cbc|aes-128-ctr|aes-256-cbc|aes-256-ctr]</encryption_method>
        <encryption_key>[Hexidecimal string]</encryption_key>
        <encryption_key_file>[URL]</encryption_key_file>
        <encryption_iv>[Hexidecimal string]</encryption_iv>
        <encryption_password>[Password]</encryption_password>
    </format>
</query>
{
    "query": {
        "userid": "[UserID]",
        "userkey": "[UserKey]",
        "action": "[Action]",
        "format": {
            "encryption": "[yes|no]",
            "encryption_method": "[aes-128-cbc|aes-128-ctr|aes-256-cbc|aes-256-ctr]",
            "encryption_key": "[Hexidecimal string]",
            "encryption_key_file": "[URL]",
            "encryption_iv": "[Hexidecimal string]",
            "encryption_password": "[Password]"
        }
    }
}
ParameterDescriptionAllowed ValuesDefault Value
encryptionEncrypt the output files.yes,nono
encryption_methodSpecify the encryption method.aes-128-cbc, aes-128-ctr, aes-256-cbc, aes-256-ctraes-128-cbc
encryption_keySpecify the encryption key.32 hexidecimal characters ([0-9a-f])None
encryption_key_fileSpecify the URL to the encryption key file.Valid URL to encryption key file.None
encryption_ivSpecify the encryption initialization vector.32 hexidecimal characters ([0-9a-f])None
encryption_passwordSpecify the password for to generate the initialization vector.Any set of characters.None