Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check the header for decrypting. #10

Open
Firesphere opened this issue Jul 27, 2016 · 1 comment
Open

Check the header for decrypting. #10

Firesphere opened this issue Jul 27, 2016 · 1 comment

Comments

@Firesphere
Copy link
Collaborator

Currently, we decrypt if the string is long. This is not the right way to do it, we should check if the header is set.

@Taitava
Copy link
Contributor

Taitava commented May 23, 2017

Just for reference, you @Firesphere had a good discussion about this in the defuse/php-encryption module's issue tracker.

So the bottom line is that we need a separate flag that would tell us that the value is encrypted (or decrypted). Another way would be to check the header, but as pointed out in the discussion, that would not be 100% reliable, as also unencrypted strings can (in theory) start with the same "def5" bytes that would be used to identify the string as encrypted.

I'm interested to have a look at this issue, but unluckily I don't have time for it right now, but if I'll encounter a solution at some point, I will definitively post more about it here or make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants