Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

(ichimunki) Re: Crypt::TripleDES decrypting problem

by ichimunki (Priest)
on Jan 10, 2002 at 04:38 UTC ( #137637=note: print w/ replies, xml ) Need Help??


in reply to Crypt::TripleDES decrypting problem

I have two questions: first, have you tried concatenating the input instead of going through line by line to see if you can get this to work that way? And second, if you are going to continue with the line-by-line approach, why load the whole file into memory at once?


Comment on (ichimunki) Re: Crypt::TripleDES decrypting problem
Re: (ichimunki) Re: Crypt::TripleDES decrypting problem
by sparkyichi (Deacon) on Jan 10, 2002 at 20:37 UTC
    I dropped the @file and worked directly with the file. I still have the same problem.
    while (<INPUT>){ my $plaintext = $des->decrypt3 ( $_, $passcode ); print OUTPUT "$plaintext"; }
    Sparky
      I think that's odd. It should be able to accept those \n-delimited records as unique bits, and you appeared to be storing them again as \n delimited records. Which means that maybe \n is not a reliable separator for whatever reason. Have you tried concatenating all of the records in the plaintext file before encrypting (i.e. keep the \n in there, just simply slurp the file into a scalar) and then decrypting that ciphertext as a single blob as well?
        I took chomp out completely and removed the \n from the print statements. I even cleaned up the source file some, making sure that there was no extra long lines or anything like that. Still the same thing, although it is not dying in the same place after I make a change. This is looking more and more like a buffering problem in the module. It works fine on one liners.
        Sparky

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-12-20 05:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls