I'm on Laravel 5.8, I need to store/query tokens in the table in the database.
Ex. My token is
eyJhbGciOiJS1234zz
To add an extra layer of Cryptography
I would like to store it with a specific password, ex. snow
I can add this in .env like this SALT_PASSWORD=snow
I want to do something like this
encrypt(salt(env('SALT_PASSWORD'), 'eyJhbGciOiJS1234zz'))
so only the people who know the SALT_PASSWORD can decrypt the token.
decrypt(salt(env('SALT_PASSWORD'), 'eyJhbGciOiJS1234zz'))
I'm not sure what I am trying to do is call, or possible in PHP.
Can someone please shed some lights on this ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire