Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^9: convert hexadecimal value to encrypted string

by dakkar (Hermit)
on Dec 12, 2004 at 10:50 UTC ( #414221=note: print w/replies, xml ) Need Help??


in reply to Re^8: convert hexadecimal value to encrypted string
in thread convert hexadecimal value to encrypted string

This works for me:

my $cypher1_b64='Y52HnyJMoqG6c8xIhNvTYg=='; my $cypher1=decode_base64($cypher1_b64); my $cypher2_hex='639D879F224CA2A1BA73CC4884DBD362'; my $cypher2=pack 'H*',$cypher2_hex; print "ok 1\n" if $cypher1 eq $cypher2;
-- 
        dakkar - Mobilis in mobile

Most of my code is tested...

Perl is strongly typed, it just has very few types (Dan)

Replies are listed 'Best First'.
Re^10: convert hexadecimal value to encrypted string
by linuxfan (Beadle) on Dec 13, 2004 at 21:31 UTC
    Thanks Dakkar. Exactly what I was looking for. Using this solution I can verify the integrity of the encryption process.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://414221]
help
Chatterbox?
[Discipulus]: so karlgoethebier, what this idiom is and where i can read about it? i tried to deparse and gives error..;=(
[karlgoethebier]: Eily: non-people == persone non grata?
[Your Mother]: Corion: I have lost the link to the pmdev guide(s). Do you have that handy?
[karlgoethebier]: Discipulus: see per lop please how to avoid the classic <c>perl dangerous.pl 'rm -rfv *|'</>
[Eily]: karlgoethebier: more like grata non persona :P
Discipulus personae non gratae..

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2017-07-21 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (319 votes). Check out past polls.