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

Re: OpenSSL and Crypt::CBC don't give the same cipher text

by Anonymous Monk
on Feb 06, 2016 at 01:54 UTC ( [id://1154539]=note: print w/replies, xml ) Need Help??


in reply to OpenSSL and Crypt::CBC don't give the same ciphertext

$iv = pack("h*", $iv); $fixed_key = pack("h*", $fixed_key);
Is that correct? How does openssl interpret iv and key strings? Note that "With format "h", the first character of the pair determines the least-significant nybble of the output character"
$ perl -E 'say ord pack "h*", "01"' 16 # that is, 0x10 $ perl -E 'say ord pack "H*", "01"' 1

Replies are listed 'Best First'.
Re^2: OpenSSL and Crypt::CBC don't give the same cipher text
by LonelyPilgrim (Beadle) on Feb 06, 2016 at 02:08 UTC
    Thanks. This was indeed the problem. I realized it myself around the same time you posted your comment.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found