I am just doing some tests and have got myself a bit confused on CI3 and encryption.
I encrypt a simple string like 'HelloWorld', call it $coded and store it in a database BLOB field.
I then, from a controller, read the blob field and call it $db_coded.
I compare $coded and $db_coded and the comparison fails.
BUT, if I decrypt $db_coded and compare it to 'HelloWorld', the comparison passes.
Why would that be? Is it something to do with the prepended length on the Blob field?
If later I need to do a lookup on the field I will need to encrypt the 'HelloWorld' to compare it to the Blob field, but that comparison is failing.
Thanks in advance for any help or advice and apologies if I have just missed something really daft :-)
Best wishes,
Paul.