Support the ongoing development of Laravel.io →
Security Requests Packages

I am trying to encrypt json encoded string from laravel's default encryption. But i am not sure it's using the AES-256-CBC The reason behind this i am also trying same encryption from AES custom class.

What i did.

  1. json_encode an array
  2. set the key ,mode and blocksize in AES custom class and generating the token.
  3. encrypt the token.
  4. set encrypted token using setData
  5. decrypt using AES custom class

Result is same as i was having in step1.

When i tried to encrypt (Crypt::encrypt($requestToken);) and decrypt (Crypt::decrypt($encrypt)) is giving correct result.

Now the problem is i am encrypting through (Crypt::encrypt($requestToken);) and want to decrypt through AES custom class. I am not sure that client is having laravel or not .

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

phpspider phpspider Joined 14 Oct 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.