I have a string encrypted in Coldfusion which needs to be decrypted in PHP for usage. So i am looking for a method which corresponds to: Decrypt(stringToDecrypt,”2450RDSET0C”,”CFMX_COMPAT”,”HEX”) …
Tag: encryption
How to encrypt id in URL laravel
I want to encrypt the id in URL I’ll show my controller code and route. I’ve already used Crypt::encrypt($id); in my controller but it’s not working properly so I’ve commented that line in my controller this is my controller this is my route this is my blade Answer Use laravel builtin encryption to achieve this: While adding your route in
PHP and Sodium – Unable to pass a nonce publicly in a form
As the title suggest i am having difficulty in passing the value of a nonce publicly through a form. I have tried using both a hidden field in the form and passing the value as a parameter in the url. The nonce is created using: When I try to use the retrieved value (eg sodium_crypto_secretbox_open) form either a hidden field
How can I store random_bytes in a database in PHP?
Inside of my migration I have a string column named encryption_key which looks like this: I have a Controller that uses a trait to generate the encryption commands. The trait looks like this so far However, upon testing this I receive this error: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: ‘xFFXx8Afx1F$…’ for column ‘encryption_key’ at row 1 (SQL: insert
Encrypt / Decrypt personal data Codeigniter
I started updating my application to be compliant with GDPR. This application is using latest version of Codeigniter (I updated now as well). I’m trying to encrypt user’s email address using ‘Encryption’ library. I set my encryption key and I used $this->encryption->encrypt() to encrypt my email address. Everything is fine until here, but how am I supposed to check if
PHP Libsodium default encryption method
I’m sure this must’ve been asked and answered but can’t find where… With libsodium in PHP (7.0 / 7.1), what is the default encryption method employed (or where to find it) when you do something like this? A client wants it stated in the handover documentation but I can’t find what it is. Answer Algorithm details Encryption: XSalsa20 stream cipher
mcrypt is deprecated, what is the alternative?
The mcrypt-extension is deprecated will be removed in PHP 7.2 according to the comment posted here. So I am looking for an alternative way to encrypt passwords. Right now I am using something like I need your opinion for the best/strongest way to encrypt passwords, the encrypted password should of course supported by PHP 7.xx and should also be decryptable
phpseclib error bigInterger not found on line x
hi this my error when i want implement RSA algorithm in PHP how to fix this problem everything seems okay and i not changing anything Fatal error: Class ‘phpseclibMathBigInteger’ not found in phpseclib/Crypt/RSA.php on line 509 this is line 509 in __construct method of RSA class $this->zero = new BigInteger(0); how to fix this problem Answer My guess: you’re trying
CryptoJS encrypts AES with passphrase but PHP decrypt needs a key
I am using CryptoJS to encrypt a string: As I understand it, CryptoJS uses the passphrase to generate a key, which is then used to encrypt the data. However I’d like to decrypt the cipher using a PHP function, or maybe an online tool such as this: http://aesencryption.net/ The issue is that these expect a key, not a passphrase. How
Can not import RSA keys generated with php openssl to windows CryptoAPI
have problems importing keys generated with php openssl to CryptoAPI I successfully create key pair in php, crypt/decrypt a string with it – no problems Then I wrote a program in Delphi which should import private and public keys into CryptoAPI. I found some example private RSA key in internet and it imports with my code perfectly, but when I