Skip to content
Advertisement

Tag: libsodium

AES-256-GCM unavailable in PHP ext-sodium on M1 Macbook

Recently at work we’ve had a new hire to work on a project of ours that utilizes AES-256-GCM encryption and decryption via PHP’s sodium extension. Since we all use Macbooks, the new employee received a 2020 Macbook Pro with M1 chip. The first attempt at getting the aforementioned project up and running was using a HomeBrew setup, which runs the

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

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

Using Libsodium with PHP on WAMP

I’m having really hard trouble installing libsodium on my local server (WAMP64). I used this guide and many others, but still no luck. I successfully installed PEAR but I can’t use it to install the PHP wrapper of libsodium. Can someone post a little guide step by step to help me? I would appreciate help installing Halite, wich needs libsodium,

Advertisement