src/MediaServices/Models/ContentKey.php
private function _generateChecksum($aesKey, $usePadding = false)
    {
        if ($usePadding) {
            $aesKey = $this->pkcs5_pad($aesKey, 16);
        }

        $encrypted = openssl_encrypt($this->_id, 'aes-256-ecb', $aesKey, OPENSSL_RAW_DATA);

        $this->_checksum = base64_encode(substr($encrypted, 0, 8));
    }
private function _generateChecksum($aesKey, $usePadding = false)
    {
        if ($usePadding) {
            $aesKey = $this->pkcs5_pad($aesKey, 16);
        }

        $encrypted = openssl_encrypt($this->_id, 'aes-256-ecb', $aesKey, OPENSSL_RAW_DATA);

        $this->_checksum = base64_encode(substr($encrypted, 0, 8));
    }
private function _generateChecksum ( $ aesKey , $ usePadding = false ) { if ( $ usePadding ) { $ aesKey = $ this -> pkcs5_pad ( $ aesKey , 16 ) ; } $ encrypted = openssl_encrypt ( $ this -> _id , 'aes-256-ecb' , $ aesKey , OPENSSL_RAW_DATA ) ; $ this -> _checksum = base64_encode ( substr ( $ encrypted , 0 , 8 ) ) ; }
Generate checksum for content key.

@param string $aesKey     Content key
@param bool   $usePadding
Generate checksum for content key .