From: Virden, L. W. <lv...@ca...> - 2007-11-12 15:30:23
|
Gerald, I was just copying the question from the wiki - knowing that the experts on this list might not always see a question buried on that page. I don't know the person asking the question, nor what variations they did or did not try. =20 --=20 <URL: http://wiki.tcl.tk/ > Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. <URL: mailto:lv...@gm... > <URL: http://www.purl.org/NET/lvirden/ > =20 -----Original Message----- From: Gerald W. Lester [mailto:ger...@gm...]=20 Sent: Monday, November 12, 2007 10:25 AM To: Virden, Larry W. Cc: tcl...@li... Subject: Re: [Tcllib-devel] question from the wiki Virden, Larry W. wrote: > Over at http://wiki.tcl.tk/18004 , I noticed this question: > > package require blowfish > > puts "[blowfish::blowfish -dir decrypt -key STNkeySTNkeySTNk [binary format H* [blowfish::blowfish -hex -dir encrypt -key STNkeySTNkeySTNk muukav]]] hohoho" > > same example in a more readable way: > > set pw [blowfish::blowfish -hex -dir encrypt -key STNkeySTNkeySTNk=20 > muukav] > > puts "[blowfish::blowfish -dir decrypt -key STNkeySTNkeySTNk [binary format H* $pw]] hohoho" > > Why does these only return muukav and not muukav hohoho? RS: Maybe the blowfish::blowfish result has extra \NUL bytes at the end? Tcl can stand that, but puts might terminate at a NUL byte. > > Anyone an expert on blowfish? > =20 Larry, Your example writes 'muukav hohoho" to standard out -- the puts returns a null string. This was tested on OS X 10.5 with both the 8.4 build that comes with OS X and the 8.5b1 build from ActiveState. Did you try this yourself or did one of your developers tell you this? --=20 +--------------------------------+-------------------------------------- -+ | Gerald W. Lester | |"The man who fights for his ideals is the man who is alive." -=20 |Cervantes| +----------------------------------------------------------------------- -+ |