Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: OpenSSL and Crypt::CBC don't give the same ciphertext (binmode always)

by syphilis (Archbishop)
on Feb 06, 2016 at 06:05 UTC ( [id://1154543]=note: print w/replies, xml ) Need Help??


in reply to Re^2: OpenSSL and Crypt::CBC don't give the same ciphertext (binmode always)
in thread OpenSSL and Crypt::CBC don't give the same ciphertext

how many thousands of times have you seen the solution to a problem was a missing call to binmode?

I've seen that lots of times .... on Windows ;-)

Cheers,
Rob
  • Comment on Re^3: OpenSSL and Crypt::CBC don't give the same ciphertext (binmode always)

Replies are listed 'Best First'.
Re^4: OpenSSL and Crypt::CBC don't give the same ciphertext (binmode always)
by LonelyPilgrim (Beadle) on Feb 09, 2016 at 23:01 UTC
    The binmode can't hurt, and makes the code more portable. It makes explicit that this is binary data we are dealing with and we don't want anybody monkeying with our bytes. I do run Perl on Windows machines pretty often, and I have no expectation that whomever I send a script to will be running *nix. If I remember to do this beforehand, I don't have to beat my head against it later wondering why it doesn't work. :)

Log In?
Username:
Password:

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

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

    No recent polls found