in reply to perl encryptions keys vs. c
I tried with key "ciao" and @k ends up with only two elements instead of 4 as in the C version, which operates on all 4 characters. I really don't know anything about pack/unpack, so I cannot solve the problem without studying it, and it's friday afternoon :)@k = unpack( 'C*', pack( 'H*', shift ) );
Update: sorry, fried in friday, I completely missed the pre-calculations over the input key, ikegami answer forced me to take a deeper look. I swear I'll re-read it, in the meantime "--" me!
Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')
Don't fool yourself.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl encryptions keys vs. c
by ikegami (Patriarch) on Apr 22, 2005 at 19:03 UTC |