Welcome Guest, Not a member yet? Register   Sign In
Encryption produces gibberish string
#3

(02-07-2021, 03:53 AM)craig Wrote:
Quote:You’ll notice that the createKey() method outputs binary data, which is hard to deal with (i.e., a copy-paste may damage it), so you may use bin2hex(), or base64_encode to work with the key in a more friendly manner.

You might find the same technique useful for the results of encryption:
Code:
// Encrypt some text & make the results text
$encoded = base64_encode($encrypter->encrypt($plaintext));

https://www.codeigniter.com/user_guide/l...or-results


I think you have the base64_encode in the wrong place.



I figured it out, thanks. 
Reply


Messages In This Thread
RE: Encryption produces gibberish string - by dennisdup - 02-07-2021, 02:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB