Javascript 使用密钥加密和解密视频链接

Javascript 使用密钥加密和解密视频链接,javascript,jquery,encryption,codeigniter-3,php-7,Javascript,Jquery,Encryption,Codeigniter 3,Php 7,我想加密和解密视频链接 <iframe d="ytplayer" width="972" height="284" src='<?php echo $fetchorderdetails['video_links'];?>' frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"> 上面的代码工作正常,但问题是我想用密钥和用户ID解密

我想加密和解密视频链接

<iframe d="ytplayer" width="972" height="284" src='<?php echo $fetchorderdetails['video_links'];?>' frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture">

上面的代码工作正常,但问题是我想用密钥和用户ID解密 我正在会话中使用UserId $this->session->userdata('id')

<?php
$this->encryption->initialize(array('driver' => 'openssl'));
$plain_text =  $fetchorderdetails[0]['video_links'];
$ciphertext = $this->encryption->encrypt($plain_text);
echo $ciphertext;
echo $this->encryption->decrypt($ciphertext);
?>