Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: strings to number and XOR

by almut (Canon)
on Oct 07, 2009 at 00:49 UTC ( [id://799624]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $msg = "this is a test messagez";
    $key = "\x4f\xcb";   # or  $key = pack "n", 0x4fcb;
    ...
    74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 6d 65 73 73 61 67 65 7a
    4f cb
    3b a3 69 73 20 69 73 20 61 20 74 65 73 74 20 6d 65 73 73 61 67 65 7a
    
  2. or download this
        $key = "\x4f\xcb" x (length($msg)/2);
    or
        $key = pack("n", 0x4fcb) x (length($msg)/2);
    
  3. or download this
    t  h  i  s     i  s     a     t  e  s  t     m  e  s  s  a  g  e  z
    74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 6d 65 73 73 61 67 65 7a  
    + $msg
    4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb     
    + $key
    3b a3 26 b8 6f a2 3c eb 2e eb 3b ae 3c bf 6f a6 2a b8 3c aa 28 ae 7a  
    + XOR result
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://799624]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-03-19 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found