public function encrypt($string, $key)
{
try {
return $this->driverInstance->encrypt($string, $key);
} catch (\Exception $e) {
throw new CryptException($e->getMessage());
}
}
/** * Encrypts the given $string using the $key variable as encryption key. * * @param string $string Raw string that should be encrypted. * @param string $key Security key used for encryption. * * @return string Encrypted key. */ public function encrypt($string, $key) { return $this->serviceInstance->encrypt($string, $key); }