Skip to content

Commit 1ca178a

Browse files
hashes - D - Tcl 9 compatibility warnings.
1 parent 3fac0cf commit 1ca178a

File tree

25 files changed

+348
-15
lines changed

25 files changed

+348
-15
lines changed

embedded/md/tcllib/files/modules/md4/md4.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,23 @@ Alternatively if __cryptkit__ is available this will be used\. If no
6868
accelerator package can be found then the pure\-tcl implementation is used\. The
6969
programming interface remains the same in all cases\.
7070

71+
*BEWARE* The commands in this package expect binary data as their input\. When
72+
a __\-file__ is provided then this is ensured by the commands themselves, as
73+
they open the referenced file in binary mode\. When literal data, or a
74+
__\-channel__ are provided instead, then the command's *caller is
75+
responsible* for ensuring this fact\. The necessary conversion command is
76+
__encoding convertto utf\-8 $string__\.
77+
78+
*ATTENTION*, there is a *Tcl 9 COMPATIBILITY ISSUE* here\.
79+
80+
*Tcl 8\.x silently mishandles* non\-binary input by cutting it internally to
81+
size\. I\.e\. by only using the low byte of a higher unicode point\. No error is
82+
thrown, the *result is simply wrong*\.
83+
84+
*Tcl 9 throws an error* instead, i\.e\.
85+
86+
expected byte sequence but character <location> was ...
87+
7188
# <a name='section2'></a>COMMANDS
7289

7390
- <a name='1'></a>__::md4::md4__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

embedded/md/tcllib/files/modules/md5/md5.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,40 @@ applications\.
6767
If you have __critcl__ and have built the __tcllibc__ package then the
6868
implementation of the hashing function will be performed by compiled code\.
6969
Alternatively 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
7575
string\. This has been changed to simplify the programming interface and to make
7676
this version more compatible with other implementations\. To obtain the previous
7777
usage, either explicitly specify package version 1 or use the *\-hex* option to
7878
the __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* &#124; *\-file filename* &#124; *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

embedded/md/tcllib/files/modules/ripemd/ripemd128.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ This package will use __Trf__ to accelerate the digest computation if
6969
available\. In the absence of an accelerator package the pure\-Tcl implementation
7070
will be used\.
7171

72+
*BEWARE* The commands in this package expect binary data as their input\. When
73+
a __\-file__ is provided then this is ensured by the commands themselves, as
74+
they open the referenced file in binary mode\. When literal data, or a
75+
__\-channel__ are provided instead, then the command's *caller is
76+
responsible* for ensuring this fact\. The necessary conversion command is
77+
__encoding convertto utf\-8 $string__\.
78+
79+
*ATTENTION*, there is a *Tcl 9 COMPATIBILITY ISSUE* here\.
80+
81+
*Tcl 8\.x silently mishandles* non\-binary input by cutting it internally to
82+
size\. I\.e\. by only using the low byte of a higher unicode point\. No error is
83+
thrown, the *result is simply wrong*\.
84+
85+
*Tcl 9 throws an error* instead, i\.e\.
86+
87+
expected byte sequence but character <location> was ...
88+
7289
# <a name='section2'></a>COMMANDS
7390

7491
- <a name='1'></a>__::ripemd::ripemd128__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

embedded/md/tcllib/files/modules/ripemd/ripemd160.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ This package will use __cryptkit__ or __Trf__ to accelerate the digest
6767
computation if either package is available\. In the absence of an accelerator
6868
package the pure\-Tcl implementation will be used\.
6969

70+
*BEWARE* The commands in this package expect binary data as their input\. When
71+
a __\-file__ is provided then this is ensured by the commands themselves, as
72+
they open the referenced file in binary mode\. When literal data, or a
73+
__\-channel__ are provided instead, then the command's *caller is
74+
responsible* for ensuring this fact\. The necessary conversion command is
75+
__encoding convertto utf\-8 $string__\.
76+
77+
*ATTENTION*, there is a *Tcl 9 COMPATIBILITY ISSUE* here\.
78+
79+
*Tcl 8\.x silently mishandles* non\-binary input by cutting it internally to
80+
size\. I\.e\. by only using the low byte of a higher unicode point\. No error is
81+
thrown, the *result is simply wrong*\.
82+
83+
*Tcl 9 throws an error* instead, i\.e\.
84+
85+
expected byte sequence but character <location> was ...
86+
7087
# <a name='section2'></a>COMMANDS
7188

7289
- <a name='1'></a>__::ripemd::ripemd160__ ?*\-hex*? \[ *\-channel channel* &#124; *\-file filename* &#124; *string* \]

embedded/md/tcllib/files/modules/sha1/sha1.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,23 @@ applications\.
6868
This package also includes support for creating keyed message\-digests using the
6969
HMAC algorithm from RFC 2104 \(3\) with SHA1 as the message\-digest\.
7070

71+
*BEWARE* The commands in this package expect binary data as their input\. When
72+
a __\-file__ is provided then this is ensured by the commands themselves, as
73+
they open the referenced file in binary mode\. When literal data, or a
74+
__\-channel__ are provided instead, then the command's *caller is
75+
responsible* for ensuring this fact\. The necessary conversion command is
76+
__encoding convertto utf\-8 $string__\.
77+
78+
*ATTENTION*, there is a *Tcl 9 COMPATIBILITY ISSUE* here\.
79+
80+
*Tcl 8\.x silently mishandles* non\-binary input by cutting it internally to
81+
size\. I\.e\. by only using the low byte of a higher unicode point\. No error is
82+
thrown, the *result is simply wrong*\.
83+
84+
*Tcl 9 throws an error* instead, i\.e\.
85+
86+
expected byte sequence but character <location> was ...
87+
7188
# <a name='section2'></a>COMMANDS
7289

7390
- <a name='1'></a>__::sha1::sha1__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]

embedded/md/tcllib/files/modules/sha1/sha256.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ algorithms are related to the SHA1 algorithm\.
6969
This package also includes support for creating keyed message\-digests using the
7070
HMAC algorithm from RFC 2104 \(3\) with SHA256 as the message\-digest\.
7171

72+
*BEWARE* The commands in this package expect binary data as their input\. When
73+
a __\-file__ is provided then this is ensured by the commands themselves, as
74+
they open the referenced file in binary mode\. When literal data, or a
75+
__\-channel__ are provided instead, then the command's *caller is
76+
responsible* for ensuring this fact\. The necessary conversion command is
77+
__encoding convertto utf\-8 $string__\.
78+
79+
*ATTENTION*, there is a *Tcl 9 COMPATIBILITY ISSUE* here\.
80+
81+
*Tcl 8\.x silently mishandles* non\-binary input by cutting it internally to
82+
size\. I\.e\. by only using the low byte of a higher unicode point\. No error is
83+
thrown, the *result is simply wrong*\.
84+
85+
*Tcl 9 throws an error* instead, i\.e\.
86+
87+
expected byte sequence but character <location> was ...
88+
7289
# <a name='section2'></a>COMMANDS
7390

7491
- <a name='1'></a>__::sha2::sha256__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]

idoc/man/files/modules/md4/md4.n

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,26 @@ code\&. Alternatively if \fBcryptkit\fR is available this will be
309309
used\&. If no accelerator package can be found then the pure-tcl
310310
implementation is used\&. The programming interface remains the same in
311311
all cases\&.
312+
.PP
313+
\fIBEWARE\fR
314+
The commands in this package expect binary data as their input\&.
315+
When a \fB-file\fR is provided then this is ensured by the commands
316+
themselves, as they open the referenced file in binary mode\&.
317+
When literal data, or a \fB-channel\fR are provided instead, then the
318+
command's \fIcaller is responsible\fR for ensuring this fact\&.
319+
The necessary conversion command is \fBencoding convertto utf-8 $string\fR\&.
320+
.PP
321+
\fIATTENTION\fR, there is a \fITcl 9 COMPATIBILITY ISSUE\fR here\&.
322+
.PP
323+
\fITcl 8\&.x silently mishandles\fR non-binary input by cutting it
324+
internally to size\&. I\&.e\&. by only using the low byte of a higher unicode point\&.
325+
No error is thrown, the \fIresult is simply wrong\fR\&.
326+
.PP
327+
\fITcl 9 throws an error\fR instead, i\&.e\&.
328+
.CS
329+
330+
expected byte sequence but character <location> was \&.\&.\&.
331+
.CE
312332
.SH COMMANDS
313333
.TP
314334
\fB::md4::md4\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]

idoc/man/files/modules/md5/md5.n

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ attack\&. MD5 should be used in preference to MD4 for new applications\&.
307307
If you have \fBcritcl\fR and have built the \fBtcllibc\fR
308308
package then the implementation of the hashing function will be
309309
performed by compiled code\&. Alternatively if you have either
310-
\fBcryptkit\fR or \fBTrf\fR then either of these can be used to
310+
\fBcryptkit\fR or \fBTrf\fR then either of these is used to
311311
accelerate the digest computation\&. If no suitable compiled package is
312-
available then the pure-Tcl implementation wil be used\&. The
312+
available then the pure-Tcl implementation is used\&. The
313313
programming interface remains the same in all cases\&.
314314
.PP
315315
\fINote\fR the previous version of this package always returned a
@@ -318,10 +318,30 @@ interface and to make this version more compatible with other
318318
implementations\&. To obtain the previous usage, either explicitly
319319
specify package version 1 or use the \fI-hex\fR option to the
320320
\fBmd5\fR command\&.
321+
.PP
322+
\fIBEWARE\fR
323+
The commands in this package expect binary data as their input\&.
324+
When a \fB-file\fR is provided then this is ensured by the commands
325+
themselves, as they open the referenced file in binary mode\&.
326+
When literal data, or a \fB-channel\fR are provided instead, then the
327+
command's \fIcaller is responsible\fR for ensuring this fact\&.
328+
The necessary conversion command is \fBencoding convertto utf-8 $string\fR\&.
329+
.PP
330+
\fIATTENTION\fR, there is a \fITcl 9 COMPATIBILITY ISSUE\fR here\&.
331+
.PP
332+
\fITcl 8\&.x silently mishandles\fR non-binary input by cutting it
333+
internally to size\&. I\&.e\&. by only using the low byte of a higher unicode point\&.
334+
No error is thrown, the \fIresult is simply wrong\fR\&.
335+
.PP
336+
\fITcl 9 throws an error\fR instead, i\&.e\&.
337+
.CS
338+
339+
expected byte sequence but character <location> was \&.\&.\&.
340+
.CE
321341
.SH COMMANDS
322342
.TP
323343
\fB::md5::md5\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]
324-
Calculate the MD5 digest of the data given in string\&. This is returned
344+
Calculate the MD5 digest of the binary data given in string\&. This is returned
325345
as a binary string by default\&. Giving the \fI-hex\fR option will
326346
return a hexadecimal encoded version of the digest\&.
327347
.sp

idoc/man/files/modules/ripemd/ripemd128.n

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,26 @@ This package will use \fBTrf\fR to
310310
accelerate the digest computation if available\&. In
311311
the absence of an accelerator package the pure-Tcl implementation will
312312
be used\&.
313+
.PP
314+
\fIBEWARE\fR
315+
The commands in this package expect binary data as their input\&.
316+
When a \fB-file\fR is provided then this is ensured by the commands
317+
themselves, as they open the referenced file in binary mode\&.
318+
When literal data, or a \fB-channel\fR are provided instead, then the
319+
command's \fIcaller is responsible\fR for ensuring this fact\&.
320+
The necessary conversion command is \fBencoding convertto utf-8 $string\fR\&.
321+
.PP
322+
\fIATTENTION\fR, there is a \fITcl 9 COMPATIBILITY ISSUE\fR here\&.
323+
.PP
324+
\fITcl 8\&.x silently mishandles\fR non-binary input by cutting it
325+
internally to size\&. I\&.e\&. by only using the low byte of a higher unicode point\&.
326+
No error is thrown, the \fIresult is simply wrong\fR\&.
327+
.PP
328+
\fITcl 9 throws an error\fR instead, i\&.e\&.
329+
.CS
330+
331+
expected byte sequence but character <location> was \&.\&.\&.
332+
.CE
313333
.SH COMMANDS
314334
.TP
315335
\fB::ripemd::ripemd128\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]

idoc/man/files/modules/ripemd/ripemd160.n

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,26 @@ This package will use \fBcryptkit\fR or \fBTrf\fR to
308308
accelerate the digest computation if either package is available\&. In
309309
the absence of an accelerator package the pure-Tcl implementation will
310310
be used\&.
311+
.PP
312+
\fIBEWARE\fR
313+
The commands in this package expect binary data as their input\&.
314+
When a \fB-file\fR is provided then this is ensured by the commands
315+
themselves, as they open the referenced file in binary mode\&.
316+
When literal data, or a \fB-channel\fR are provided instead, then the
317+
command's \fIcaller is responsible\fR for ensuring this fact\&.
318+
The necessary conversion command is \fBencoding convertto utf-8 $string\fR\&.
319+
.PP
320+
\fIATTENTION\fR, there is a \fITcl 9 COMPATIBILITY ISSUE\fR here\&.
321+
.PP
322+
\fITcl 8\&.x silently mishandles\fR non-binary input by cutting it
323+
internally to size\&. I\&.e\&. by only using the low byte of a higher unicode point\&.
324+
No error is thrown, the \fIresult is simply wrong\fR\&.
325+
.PP
326+
\fITcl 9 throws an error\fR instead, i\&.e\&.
327+
.CS
328+
329+
expected byte sequence but character <location> was \&.\&.\&.
330+
.CE
311331
.SH COMMANDS
312332
.TP
313333
\fB::ripemd::ripemd160\fR ?\fI-hex\fR? [ \fI-channel channel\fR | \fI-file filename\fR | \fIstring\fR ]

0 commit comments

Comments
 (0)