Welcome Guest, Not a member yet? Register   Sign In
Encrypted String Changes Every Time (very bad!)
#1

[eluser]PhxVyper[/eluser]
Hi,

So, I am encrypting a string and noticed that every time I encrypt that very same string, the encrypted string is different EVERY TIME.

To test, I hard-coded the key to ensure it is the same key every time.

$this->load->library('encrypt');
echo $this->encrypt->encode('this is a test string','blahblahblah');

result 1:
PeGPM6MIq6Wn/eE9LHcQYKuVolY2LEQicmHiX3/vYK+pi28FV/Z2heAJMUtMQL4Av6hY/hTe0CUdpJhIKM6ZhA==

result 2:
+rLk+B6TTldVQb5NdD6UFB6gjo11jHbSHeZ2rC6TFmYg8LNg/TSH1YcNCEpe8sQGYqYaF2iHbZHpbhzFGsnEXg==

result 3:
Ne8lVIdFGGujf7wQrDojYy+oVejIOaOtNU7Pc1INbdYNq4/zUvFiwdrGFkxVasr+eWBQ9PgTzIfqms46EStLAA==

and so on.

what the.....!!!!!

shouldn't the value be consistent? Otherwise, I can't decrypt it!


Messages In This Thread
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 01:08 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 01:29 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 01:50 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 02:23 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 07:38 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 08:10 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 08:12 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 08:25 PM
Encrypted String Changes Every Time (very bad!) - by El Forum - 11-17-2007, 08:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB