$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
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (3)
This really depends on what you are trying to do and what environment you are running in (nodejs, electron, web)
There is a crypto library and a cryptoJs one that are very popular
JavaScript AES encryption and decryption (Advanced Encryption Standard)
How to implement encryption and decryption using AES (Advanced Encryption Standard) in JavaScript.
Why AES (Advanced Encryption Standard) ?
Security: Competing algorithms were to be judged on their ability to resist attack, as compared to other submitted ciphers, though security strength was to be considered the most important factor in…
with cryptojs this doesn't seem possible .. I tried with few others but nothing got me this exact encryption ..
Some comments may only be visible to logged-in visitors. Sign in to view all comments.