Skip to content
Advertisement

Tag: cryptojs

Decrypt Crypto-js encrypted text with key with PHP

I’m using Crypto-js for encrypting password with a key and send it to server. I want to decrypt it in server using PHP. How this can be done? JS: Encrypted text: U2FsdGVkX1+EaW3J1GE1k/EU5h6C+nxBH364Xhez+b0= PHP: Result: string(32) “����>���s��ȡ�V?E��M���I” I’m getting weird results here. Answer The following solution is not from my side but from @Artjom B., so all credits go to him.

Generate a Paseto V2 Public Key/Token in PHP, Verify in Node.js

Preface: What is Paseto?: https://developer.okta.com/blog/2019/10/17/a-thorough-introduction-to-paseto I am using the PHP library for Paseto from here I am using the Node.js Paseto lib from here I have been able to successfully achieve the creation of a Paseto V1 token and corresponding public key using the PHP lib (with a RSA private key on the server side for keypair), and then use

Advertisement