Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Hex String XOR

by alanonymous (Sexton)
on Mar 12, 2012 at 08:22 UTC ( #959080=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        my @ar = $t1 =~ /(..)/g;
        $foo->delete("1.0","end");
        foreach (@ar) {
            $foo->insert("1.0",chr(pack("H*",$_)));
    
        }
    
  2. or download this
    $txt3->delete("1.0","end");
        my $hexor = unpack('h*',pack('h*',$t1) ^ pack('h*',$t2));
        $txt3->insert("1.0",$hexor);
    
  3. or download this
    my $hhh = unpack('h*',pack('h*',"20") ^ pack('h*',"61")); #xor ' ' and
    + 'a' should result in 'A'
        print unpack('h*',$hhh);
    
  4. or download this
    sub parse () {
    
        my $t1 = $txt1->Contents();
    ...
            }
        }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://959080]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2016-08-26 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (366 votes). Check out past polls.