Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Encryption/Decryption

From: ptretter:charter at: 5-Jul-2001 14:31

I have a problem with a script I'm working on and can't figure out why it doesn't work right. The problem is that it wont decrypt the file after encrypting it. See script below. Any suggestions? BTW: this is a crude script at the moment. ------------------------- REBOL [ author: "Paul Tretter" product: "Encryption/Decryption program" comment {This program encrypts data and decrypts data for file security} ] crypt-key: to-binary "REBOL" crypt-port: make port! [ scheme: 'crypt algorithm: 'blowfish direction: 'encrypt strength: 128 key: crypt-key padding: true ] data-sec: layout [banner "Paul's Encrypt/Decrypt Util" toggle "Encrypt" "Decrypt" [either value [crypt- port/direction: 'decrypt][crypt-port/direction: 'encrypt]] button "Choose file" [inputfile: request-file] button "process" [ open crypt-port insert crypt-port read/binary to-file inputfile update crypt-port write/binary %outputfile copy crypt-port close crypt-port ] ] view data-sec