/** * @param string $cek */ public function __construct($cek = null) { if (null === $cek) { // generate 256bits random cek, $this->content_encryption_key = Random::string(32); } else { $this->content_encryption_key = $cek; } }
/** * @return string */ public function generateIv() { return Random::string(openssl_cipher_iv_length($this->getMethod())); }