Encrypt/Decrypt Confusion - Blank Decrypts |
New to Encrypt/Decrypt in CI4. Having a strange issue where doing an encrypt/decrypt as a test on the view page works as expected. But if I save the encrypted data into my MySQL table (varchar 255 column), when I decrypt the data, it comes back blank. Looking for any pointers or a fresh set of eyes to point out my mistake.
On page (view) works: PHP Code: <?php Code: Original: 4444333322221111 But if I save the data to my table, like this: PHP Code: $post = $this->request->getPost(); and try to bring it back later in my controller with: PHP Code: $orig = $payment['cc_num']; I get: Code: Original: 2OklJexxXUZIK9uPGOHE//Bc9BIHoCc5BUD5KOva3pgCYkqyivIB+MJlbJJJSE6/5yxnf5H3h/zVhJtcCoMc8js/tq3674E4 So it appears to be saving correctly, but decrypting is returning an empty string. Any help is appreciated! |
Messages In This Thread |
Encrypt/Decrypt Confusion - Blank Decrypts - by SoccerGuy3 - 09-13-2021, 04:10 PM
RE: Encrypt/Decrypt Confusion - Blank Decrypts - by superior - 09-14-2021, 02:19 AM
RE: Encrypt/Decrypt Confusion - Blank Decrypts - by SoccerGuy3 - 09-14-2021, 07:42 AM
|