c - Trying to encrypt and decrypt code-beginner -
so bit maniuplation excercise im confused how convert letters numbers, think these arent binary dont know mean. can suggest approach?
here's 2 examples of encryption: "cats" , "kittens".
pairs: "ca ts" "ki tt en s_" (_ represents space) ints: 25441 29811 27497 29812 25966 29472 xor 31337: 6408 3610 4352 3613 7943 2377
the decimal quintet each couple of letters decimal representation of concatenated hex values of characters in ascii, eg:
"ca" = 0x63 0x61 = 0x6361 = 25441
same story xor key
31337 = 0x7a69
indeed
0x6361 ^ 0x7a69 = 0x1908 = 6408 in decimal
Comments
Post a Comment