EncryptBundle
EncryptBundle copied to clipboard
Manually decrypt value
Is there a simple way to get decrypted value having secret key and encrypted value? Like
php bin/console decrypt:value <encrypted value> [--key <secret key>]
And how do I change key (decrypt and than encrypt with new key all data) if it's is compromised?
Hi, No, there is not a CLI command for decryption individual values. I'm not sure of the use case for it, except maybe to test. But there are unit tests that do the same thing. You can and modify one of those if you need it in your own application.
A global key change command is something that would be useful. Is this something that you would be able to put a pull request for?
Thank you for quick reply! I encrypt third-party API credentials, obtained via OAuth. Sometimes there is need to use them in test API requests and in other application, and it would be handy to quickly get what is already stored in DB rather then use debugger or run authorization once again.
At the moment I haven't a single line of code which could enhance the bundle, but i'll try to implement some features and will be happy to contribute