DEV Community

Dhruv Sharma
Dhruv Sharma

Posted on

can i replicate this encryption with javascript... ?

$cnum =trim($_POST['cnum']);
$ciphering = "AES-128-CTR";
$iv_length = openssl_cipher_iv_length($ciphering);
$options = 0;
$encryption_iv = '1234467892211121';
$encryption_key = "SECRET";
$en = openssl_encrypt($cnum, $ciphering, $encryption_key, $options, $encryption_iv);
can i do same encryption with javascript

Top comments (0)