EncryptBundle icon indicating copy to clipboard operation
EncryptBundle copied to clipboard

Manually decrypt value

Open labrador-gibraltar opened this issue 2 years ago • 2 comments

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?

labrador-gibraltar avatar Oct 03 '21 14:10 labrador-gibraltar

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?

mogilvie avatar Oct 04 '21 08:10 mogilvie

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

labrador-gibraltar avatar Oct 04 '21 11:10 labrador-gibraltar