src/snapchat_agent.php
public function decryptCBC($data, $key, $iv) {
		// Decode the key and IV.
		$iv = base64_decode($iv);
		$key = base64_decode($key);

		// Decrypt the data.
		$data = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv);
		$padding = ord($data[strlen($data) - 1]);

		return substr($data, 0, -$padding);
	}
public function decryptCBC($data, $key, $iv) {
		// Decode the key and IV.
		$iv = base64_decode($iv);
		$key = base64_decode($key);

		// Decrypt the data.
		$data = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv);
		$padding = ord($data[strlen($data) - 1]);

		return substr($data, 0, -$padding);
	}
public function decryptCBC ( $ data , $ key , $ iv ) { // Decode the key and IV. $ iv = base64_decode ( $ iv ) ; $ key = base64_decode ( $ key ) ; // Decrypt the data. $ data = mcrypt_decrypt ( MCRYPT_RIJNDAEL_128 , $ key , $ data , MCRYPT_MODE_CBC , $ iv ) ; $ padding = ord ( $ data [ strlen ( $ data ) - 1 ] ) ; return substr ( $ data , 0 , - $ padding ) ; }
Decrypts blob data for stories.

@param data $data
The data to decrypt.
@param string $key
The base64-encoded key.
@param string $iv
$iv The base64-encoded IV.

@return data
The decrypted data.
Decrypts blob data for stories .