"be consistent" | |
PerlMonks |
Re: Encrypt/decrypt string in C and Perlby choroba (Cardinal) |
on Sep 18, 2016 at 13:35 UTC ( [id://1172053]=note: print w/replies, xml ) | Need Help?? |
I've never really programmed in C, but I tried the following:
The ^ operator doesn't seem to work for strings, so I had to iterate the strings character by character. It seems to work sometimes , I'm not sure why not always. Maybe you can get 0 as a result of the xor somewhere in the middle of a string? Or a newline in the middle of the key? But it should get you started.
In Section
Seekers of Perl Wisdom
|
|