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

(This post was last modified: 02-07-2021, 03:53 AM by craig.)

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.
Reply


Messages In This Thread
RE: Encryption produces gibberish string - by craig - 02-07-2021, 03:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB