Tk Library Source Code

View Ticket
Login
Ticket UUID: 3612645
Title: aes decrypt fails with -in option
Type: Bug Version: None
Submitter: Created on: 2013-05-04 19:41:18
Subsystem: aes Assigned To: aku
Priority: 5 Medium Severity: Minor
Status: Deleted Last Modified: 2013-05-31 19:17:47
Resolution: Not Applicable Here Closed By: aku
    Closed on: 2013-05-31 19:17:47
Description:
platform details: 

1. Tcl - 8.5.14 
2. Tcllib - 1.15
3. aes - 1.1

Test program: 

    package require aes 

    set key [binary format a32 0123456789012345678901234567890123456789] 

    # Encrypt 
    set outfl [open /tmp/aes.out wb+] 
    aes::aes -key $key -out $outfl "Hello World Tcl" 
    close $outfl 

    # Decrypt 
    set infl [open /tmp/aes.out rb] 
    set outfl [open /tmp/decrypt.txt w+] 
    aes::aes -dir decrypt -key $key -in $infl -out $outfl 
    close $infl 
    close $outfl 


Issue: 

When I open the decrypt.txt, I get extra garbage after the text "Hello World Tcl".
It works fine if I give the data to decrypt without -in option (ie., [read $infl]