PHP encrypt/decrypt in JAVA version

Viewed 12

this is encrypt in php.

#encrypt
$pack_key = pack('H*', $key);
$result = openssl_encrypt($str, 'DES-EDE3', $pack_key, $options);
$encrypt = bin2hex($result);

this is decrypt in php.

#decrypt
$data = hex2bin($encrypt);
$decrypt = openssl_decrypt($data, 'DES-EDE3', $pack_key, $options);

Is it possible to transform to java version?

0 Answers
Related