in reply to Re^3: OpenSSL and Crypt::CBC don't give the same ciphertext (binmode always) in thread OpenSSL and Crypt::CBC don't give the same ciphertext
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. :)
|