@@ -67,23 +67,40 @@ applications\.
6767If you have __ critcl__ and have built the __ tcllibc__ package then the
6868implementation of the hashing function will be performed by compiled code\.
6969Alternatively if you have either __ cryptkit__ or __ Trf__ then either of
70- these can be used to accelerate the digest computation\. If no suitable compiled
71- package is available then the pure\- Tcl implementation wil be used\. The
72- programming interface remains the same in all cases\.
70+ these is used to accelerate the digest computation\. If no suitable compiled
71+ package is available then the pure\- Tcl implementation is used\. The programming
72+ interface remains the same in all cases\.
7373
7474* Note* the previous version of this package always returned a hex encoded
7575string\. This has been changed to simplify the programming interface and to make
7676this version more compatible with other implementations\. To obtain the previous
7777usage, either explicitly specify package version 1 or use the * \- hex* option to
7878the __ md5__ command\.
7979
80+ * BEWARE* The commands in this package expect binary data as their input\. When
81+ a __ \- file__ is provided then this is ensured by the commands themselves, as
82+ they open the referenced file in binary mode\. When literal data, or a
83+ __ \- channel__ are provided instead, then the command's * caller is
84+ responsible* for ensuring this fact\. The necessary conversion command is
85+ __ encoding convertto utf\- 8 $string__ \.
86+
87+ * ATTENTION* , there is a * Tcl 9 COMPATIBILITY ISSUE* here\.
88+
89+ * Tcl 8\. x silently mishandles* non\- binary input by cutting it internally to
90+ size\. I\. e\. by only using the low byte of a higher unicode point\. No error is
91+ thrown, the * result is simply wrong* \.
92+
93+ * Tcl 9 throws an error* instead, i\. e\.
94+
95+ expected byte sequence but character <location> was ...
96+
8097# <a name =' section2 ' ></a >COMMANDS
8198
8299 - <a name =' 1 ' ></a >__ ::md5::md5__ ?* \- hex* ? \[ * \- channel channel* | ; * \- file filename* | ; * string* \]
83100
84- Calculate the MD5 digest of the data given in string\. This is returned as a
85- binary string by default\. Giving the * \- hex* option will return a
86- hexadecimal encoded version of the digest\.
101+ Calculate the MD5 digest of the binary data given in string\. This is
102+ returned as a binary string by default\. Giving the * \- hex* option will
103+ return a hexadecimal encoded version of the digest\.
87104
88105 The data to be hashed can be specified either as a string argument to the
89106 __ md5__ command, or as a filename or a pre\- opened channel\. If the
0 commit comments