From: Virden, L. W. <lv...@ca...> - 2007-11-12 14:32:54
|
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 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? -- Tcl - The glue of a new generation. <URL: http://wiki.tcl.tk/ > Larry W. Virden <mailto:lv...@ca...><URL: http://www.purl.org/NET/lvirden/ > Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |