src/Encryption/Service/CipherService.php
public function decrypt(string $data, string $key = null)
    {
        $key = $this->createKey($key);
        $data = unserialize(Crypto::decrypt($data, $key));

        return $data;
    }
public function decrypt(string $data, string $key = null)
    {
        $key = $this->createKey($key);
        $data = unserialize(Crypto::decrypt($data, $key));

        return $data;
    }
public function decrypt ( string $ data , string $ key = null ) { $ key = $ this -> createKey ( $ key ) ; $ data = unserialize ( Crypto :: decrypt ( $ data , $ key ) ) ; return $ data ; }
Decrypt data using secret key

@param string $data
@param string $key
@return mixed
Decrypt data using secret key