Closed Jeordy closed 6 years ago
Hi Jeordy, I've updated the encrypt files, but not really done anything that would affect how the Factory creates the OpenSSL encryptor.
The EncryptorInterface is an alias for an EncryptorService built from the EncryptorFactory. At the moment the factory only creates an OpenSSl encryptor.
Do you have OpenSSL installed?
Hi Mark,
Thank you for replying so quickly. I will install the updated version and get back to you.
(OpenSSL is installed on my Mac)
Is it possible to auto decrypt when retreiving info with doctrine? This would come in handy when creating forms.
Kind regards,
Jeordy Bouck
Van: Mark Ogilvie notifications@github.com Verzonden: woensdag 28 februari 2018 13:50 Aan: mogilvie/EncryptBundle CC: Jeordy; Author Onderwerp: Re: [mogilvie/EncryptBundle] Cannot instantiate interface SpecShaper\EncryptBundle\Encryptors\EncryptorInterface (#1)
Hi Jeordy, I've updated the encrypt files, but not really done anything that would affect how the Factory creates the OpenSSL encryptor.
The EncryptorInterface is an alias for an EncryptorService built from the EncryptorFactory. At the moment the factory only creates an OpenSSl encryptor.
Do you have OpenSSL installed?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmogilvie%2FEncryptBundle%2Fissues%2F1%23issuecomment-369229547&data=02%7C01%7C%7C9cc3ca39a23a40f8856b08d57ea9cb80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636554190087109448&sdata=tS9K%2B5%2BUtTjCcfRo00lT2JNMHXPrGNBGkn8xQgJEh7Q%3D&reserved=0, or mute the threadhttps://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAK6FsjUxl4BwJlYWHI4x37XoE71UQfDJks5tZUt-gaJpZM4SWZje&data=02%7C01%7C%7C9cc3ca39a23a40f8856b08d57ea9cb80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636554190087109448&sdata=Wuiu2boa%2F1Haev%2BUUBrSLOfgr0lN%2FIO3GNP2QpyDwrE%3D&reserved=0.
Hi jeordy, The subscriber decrypts the entity parameter on the doctrine load event. This is before you form renders. It then encrypts again on the flush event. You dont need to inject the encryptor interface for normal CRUD actions.
I just reread first message. You should be injecting the service interface into the controller action. Not instantiating inside the action.
Hi Jeordy, did this work out for you? Can I close the issue?
Hi Mark,
It's working perfectly. Creating the service and then encrypt/decrtyp did the trick.
You can close the issue.
Kind regards,
Jeordy Bouck
Van: Mark Ogilvie notifications@github.com Verzonden: zondag 4 maart 2018 23:35 Aan: mogilvie/EncryptBundle CC: Jeordy; Author Onderwerp: Re: [mogilvie/EncryptBundle] Cannot instantiate interface SpecShaper\EncryptBundle\Encryptors\EncryptorInterface (#1)
Hi Jeordy, did this work out for you? Can I close the issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmogilvie%2FEncryptBundle%2Fissues%2F1%23issuecomment-370270735&data=02%7C01%7C%7C45e21549fe7841d6614f08d582203811%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636557997246816219&sdata=2ClLGQQDxviTjo1oS5kHXNBbcvPIps2nti4%2FzL3Ail8%3D&reserved=0, or mute the threadhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAK6FskQWUiILZ_s6MM6JFCdojCsPi_V4ks5tbGwqgaJpZM4SWZje&data=02%7C01%7C%7C45e21549fe7841d6614f08d582203811%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636557997246816219&sdata=W3VIwuxydSjnFojOLY2CN0j6l02o02dYiFfAfRdSTck%3D&reserved=0.
When instantiate the EncryptorInterface in a controller, Symfony throws an exception: