Cipher API ver 1.1 update and MD5 hash

After this update, API includes one extra param in its response which is the MD5 hash of the HTML5 player file content.

This has been employed to track if the algorithm changes for the current HTML5 player. If it changed, then it will update the algo dictionary.

Even though API has its filter to check the file changes, this is also the responsibility of the client to check the status of the HTML5 player. This is even more critical when the client saved the dictionary in their local environment for faster processing, which is also the expected method to access the API.

MD5 hash of the file can be checked as follows:

First check the MD5 hash and match it with the algo dictionary MD5 hash. If both matches then file not changed otherwise make a new API call for the updated dictionary.

API is itself capable of checking the changes if any. Just you have to be aware of the file changes.

Demo example based on Cipher API

Cipher API provides the algorithm dictionary which can be used for decrypting cipher codes.

Below is the demo example for the same which is also released in Github at

You can also fork it from Github. Please do leave feedback if any.

How to use Cipher API to decrypt signatures

Before proceeding please check the home page of Cipher API:

We can retrieve the signature decrypting algorithm using two method:

  1. By passing just player ID i.e.
  2. By passing player ID and signature format i.e.

Developers can use any of them depending upon their requirement. But I recommend to use first method because first method includes the decrypting algorithm of most expected signature format.

The decrypting algorithm is in Python syntax. So developers working with PHP can use the following function to decrypt the signature using the algorithm obtained from first method:

Use above function to with proper params i.e. decrypt($signature, $algorithm) and it will return the decrypted signature.

Hopefully I have considered each case of Python syntax. If anybody found any missing case then please contribute it.

More articles will follow soon on this section.

From Git to real applications