Skip to content
Advertisement

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

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

Advertisement