Do you mean encrypt? https://laravel.com/docs/7.x/encryption
Edit: changed to correct version of the docs
How to encode and decode data with key.Any packages in laravel to encode and decode.After Encoding decoding should be restricted by any of the online websites.any solutions for this?
Do you mean encrypt? https://laravel.com/docs/7.x/encryption
Edit: changed to correct version of the docs
@Sinnbeck I am writing API in Laravel I need send return response in encoded format and decode will be done in react js will this supports in react js?
@Shawdow Whats the point of encoding/encrypting it then? I can just grab your key from react and decode it myself?
@Sinnbeck how to restrict decoding. any idea for this? encoding data in return response and decode the data only if the send valid key to decode!!
@Shawdow Why is it needed?
@Sinnbeck to make the data protected. user should not use the data.
@Shawdow Just dont send any data that you don't want them to see? I mean you can encrypt/encode it but I cannot think of a way to make 100% sure that no-one can decrypt/decode.. If you want make sure that the user sees nothing, use pure blade.
@Sinnbeck user's should use headers data.when API call happens. i want to protect this from the user side.If the users sees the data in headers he should not be able to decode data. this is what i am trying to do.
@Shawdow I cannot see any way that you can protect this 100% as all javascript is run using the users browser. So they have access to all of the react/js code. You can make it harder by doing multiple encodings, or spreading the key across multiple files etc. but that is still not 100%
@Sinnbeck thanks for the Information!
@johnDoe220 we cannot use i am using php version 7.4
@Shawdow use this => https://github.com/jedisct1/libsodium
@johnDoe220 is this PHP package?
Please or to participate in this conversation.