Open Roycohen opened 7 years ago
@Roycohen The simplest way is just to write a simple PHP C extension library including the core C functions for encryption/decryption in this nginx C module.
@Roycohen use this snippet: https://gist.github.com/siberex/ee135b2d28b3b4be77c5
This is a php code to encrypt and decrypt data in encrypted-session-nginx-module compatible way. So, you can encrypt with php and decrypt with nginx module, and vice versa.
Hello @siberex, Do you have Nodejs code?
@naviocean I don't have one. But you can easily transcribe it from php using either native NodeJS Crypto module or mcrypt npm package. Just keep in mind that nginx module does not use "true" HMAC, but simple md5 of message instead (see comments in my gist).
Hi There,
Assume I want to use this library and to decrypt and encrypt more things in PHP. How can I achieve it?
What is the encryption method? Do you have any PHP code example or can you please assist me in building one, using mcrypt or something.
Thanks