Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: strings to number and XOR

by almut (Canon)
on Oct 07, 2009 at 00:49 UTC ( #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
Node Status?
node history
Node Type: note [id://799624]
help
Chatterbox?
[Discipulus]: might be it is necessary to pass the pic data like MIME::Base64:: encode( data..
[Discipulus]: if you have a jpeg data: or as wise Corion said IM ca n read directly your handle
[Corion]: Meh. I get the feeling I should post a call-to-action for people to test their modules with the upcoming 5.26 (or 5.25.latest), as it seems that the smoke testers don't really weed out modules that fail without . in @INC
[Corion]: But without instructions on how to easily test things yourself, I don't think such a call to arms is helpful
[Corion]: (this post on nntp.perl.org / p5p makes it seem to me that smoke testers seem to have a blind spot there)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-03-27 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (317 votes). Check out past polls.