我在Laravel中使用Crypt功能加密了文本。我正在使用密码 - MCRYPT_RIJNDAEL_128和CBC。我怎样才能用Java解密?这是Laravel / PHP中的解密代码
$payload = json_encode(base64_decode($payload), true);
$value = base64_decode($payload['value']);
$iv = base64_decode($payload['iv']);
return unserialize($this->stripPadding($this->mcryptDecrypt($value, $iv)));
protected function mcryptDecrypt($value, $iv)
{
try
{
return mcrypt_decrypt($this->cipher, $this->key, $value, $this->mode, $iv);
}
catch (Exception $e)
{
throw new DecryptException($e->getMessage());
}
}