Tcl Library Source Code

Check-in [885b50ec5e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:sha1: sha1, sha256 Bugfixes - (original commit, and now) Version bump. sha256 1.0.4 sha1 2.0.4 Fixed testsuite issues introduced by commit [aa67a2cdc0]. The switch from `rename` to `interp alias` to activate an implementation was not compensated for in the code doing the deactivation just a few lines higher.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 885b50ec5e9c389968b132ce20ad01f755f3089107cb5d6d25198f342aa8a06a
User & Date: aku 2019-05-06 22:53:27.024
Context
2019-05-07
01:21
Integrated the doc overhaul work into the trunk. This makes the various guides official. check-in: 6612c2b8a8 user: aku tags: trunk
2019-05-06
23:53
Merged latest work from trunk Closed-Leaf check-in: c0006570ed user: aku tags: doc-overhaul
22:53
sha1: sha1, sha256 Bugfixes - (original commit, and now) Version bump. sha256 1.0.4 sha1 2.0.4 Fixed testsuite issues introduced by commit [aa67a2cdc0]. The switch from `rename` to `interp alias` to activate an implementation was not compensated for in the code doing the deactivation just a few lines higher. check-in: 885b50ec5e user: aku tags: trunk
01:49
math::quasirandom - Fix testsuite setup - Requirements are 8.5+OO check-in: d898baf8e5 user: aku tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to embedded/md/tcllib/files/modules/sha1/sha1.md.
1
2
3
4
5
6
7
8
9
10
11
12

[//000000001]: # (sha1 \- SHA\-x Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'sha1\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (sha1\(n\) 2\.0\.3 tcllib "SHA\-x Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>




|







1
2
3
4
5
6
7
8
9
10
11
12

[//000000001]: # (sha1 \- SHA\-x Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'sha1\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2005, Pat Thoyts <patthoyts@users\.sourceforge\.net>)
[//000000004]: # (sha1\(n\) 2\.0\.4 tcllib "SHA\-x Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require sha1 ?2\.0\.3?  

[__::sha1::sha1__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#1)  
[__::sha1::hmac__ *key* *string*](#2)  
[__::sha1::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#3)  
[__::sha1::SHA1Init__](#4)  
[__::sha1::SHA1Update__ *token* *data*](#5)  
[__::sha1::SHA1Final__ *token*](#6)  







|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require sha1 ?2\.0\.4?  

[__::sha1::sha1__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#1)  
[__::sha1::hmac__ *key* *string*](#2)  
[__::sha1::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#3)  
[__::sha1::SHA1Init__](#4)  
[__::sha1::SHA1Update__ *token* *data*](#5)  
[__::sha1::SHA1Final__ *token*](#6)  
Changes to embedded/md/tcllib/files/modules/sha1/sha256.md.
1
2
3
4
5
6
7
8
9
10
11
12

[//000000001]: # (sha256 \- SHA\-x Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'sha256\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (sha256\(n\) 1\.0\.3 tcllib "SHA\-x Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>




|







1
2
3
4
5
6
7
8
9
10
11
12

[//000000001]: # (sha256 \- SHA\-x Message\-Digest Algorithm)
[//000000002]: # (Generated from file 'sha256\.man' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright &copy; 2008, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (sha256\(n\) 1\.0\.4 tcllib "SHA\-x Message\-Digest Algorithm")

<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
href="../../../toc.md">Table Of Contents</a> &#124; <a
href="../../../../index.md">Keyword Index</a> &#124; <a
href="../../../../toc0.md">Categories</a> &#124; <a
href="../../../../toc1.md">Modules</a> &#124; <a
href="../../../../toc2.md">Applications</a> ] <hr>
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require sha256 ?1\.0\.3?  

[__::sha2::sha256__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#1)  
[__::sha2::sha224__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#2)  
[__::sha2::hmac__ *key* *string*](#3)  
[__::sha2::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#4)  
[__::sha2::SHA256Init__](#5)  
[__::sha2::SHA224Init__](#6)  







|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  - [Category](#category)

  - [Copyright](#copyright)

# <a name='synopsis'></a>SYNOPSIS

package require Tcl 8\.2  
package require sha256 ?1\.0\.4?  

[__::sha2::sha256__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#1)  
[__::sha2::sha224__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#2)  
[__::sha2::hmac__ *key* *string*](#3)  
[__::sha2::hmac__ ?__\-hex&#124;\-bin__? __\-key key__ \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#4)  
[__::sha2::SHA256Init__](#5)  
[__::sha2::SHA224Init__](#6)  
Changes to idoc/man/files/modules/sha1/sha1.n.
1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha1\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "sha1" n 2\&.0\&.3 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha1\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2005, Pat Thoyts <patthoyts@users\&.sourceforge\&.net>
'\"
.TH "sha1" n 2\&.0\&.4 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha1 \- SHA1 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha1  ?2\&.0\&.3?\fR
.sp
\fB::sha1::sha1\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha1::hmac\fR \fIkey\fR \fIstring\fR
.sp
\fB::sha1::hmac\fR ?\fB-hex|-bin\fR? \fB-key key\fR [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha1 \- SHA1 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha1  ?2\&.0\&.4?\fR
.sp
\fB::sha1::sha1\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha1::hmac\fR \fIkey\fR \fIstring\fR
.sp
\fB::sha1::hmac\fR ?\fB-hex|-bin\fR? \fB-key key\fR [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
Changes to idoc/man/files/modules/sha1/sha256.n.
1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha256\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "sha256" n 1\&.0\&.3 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,




|







1
2
3
4
5
6
7
8
9
10
11
12
'\"
'\" Generated from file 'sha256\&.man' by tcllib/doctools with format 'nroff'
'\" Copyright (c) 2008, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
'\"
.TH "sha256" n 1\&.0\&.4 tcllib "SHA-x Message-Digest Algorithm"
.\" The -*- nroff -*- definitions below are for supplemental macros used
.\" in Tcl/Tk manual entries.
.\"
.\" .AP type name in/out ?indent?
.\"	Start paragraph describing an argument to a library procedure.
.\"	type is type of argument (int, etc.), in/out is either "in", "out",
.\"	or "in/out" to describe whether procedure reads or modifies arg,
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha256 \- SHA256 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha256  ?1\&.0\&.3?\fR
.sp
\fB::sha2::sha256\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::sha224\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::hmac\fR \fIkey\fR \fIstring\fR
.sp







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
..
.BS
.SH NAME
sha256 \- SHA256 Message-Digest Algorithm
.SH SYNOPSIS
package require \fBTcl  8\&.2\fR
.sp
package require \fBsha256  ?1\&.0\&.4?\fR
.sp
\fB::sha2::sha256\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::sha224\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
.sp
\fB::sha2::hmac\fR \fIkey\fR \fIstring\fR
.sp
Changes to idoc/www/tcllib/files/modules/sha1/sha1.html.
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha1(n) 2.0.3 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha1 - SHA1 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha1(n) 2.0.4 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha1 - SHA1 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha1 <span class="opt">?2.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha1::sha1</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::sha1::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#4"><b class="cmd">::sha1::SHA1Init</b></a></li>
<li><a href="#5"><b class="cmd">::sha1::SHA1Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha1 <span class="opt">?2.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha1::sha1</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha1::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#3"><b class="cmd">::sha1::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#4"><b class="cmd">::sha1::SHA1Init</b></a></li>
<li><a href="#5"><b class="cmd">::sha1::SHA1Update</b> <i class="arg">token</i> <i class="arg">data</i></a></li>
Changes to idoc/www/tcllib/files/modules/sha1/sha256.html.
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha256(n) 1.0.3 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha256 - SHA256 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>







|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
&#124; <a href="../../../toc.html">Table Of Contents</a>
&#124; <a href="../../../../index.html">Keyword Index</a>
&#124; <a href="../../../../toc0.html">Categories</a>
&#124; <a href="../../../../toc1.html">Modules</a>
&#124; <a href="../../../../toc2.html">Applications</a>
 ] <hr>
<div class="doctools">
<h1 class="doctools_title">sha256(n) 1.0.4 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>sha256 - SHA256 Message-Digest Algorithm</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha256 <span class="opt">?1.0.3?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha2::sha256</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::sha2::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#4"><b class="cmd">::sha2::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#5"><b class="cmd">::sha2::SHA256Init</b></a></li>







|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.2</b></li>
<li>package require <b class="pkgname">sha256 <span class="opt">?1.0.4?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::sha2::sha256</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#2"><b class="cmd">::sha2::sha224</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#3"><b class="cmd">::sha2::hmac</b> <i class="arg">key</i> <i class="arg">string</i></a></li>
<li><a href="#4"><b class="cmd">::sha2::hmac</b> <span class="opt">?<b class="option">-hex|-bin</b>?</span> <b class="option">-key key</b> [ <b class="option">-channel channel</b> | <b class="option">-file filename</b> | <span class="opt">?<b class="option">--</b>?</span> <i class="arg">string</i> ]</a></li>
<li><a href="#5"><b class="cmd">::sha2::SHA256Init</b></a></li>
Changes to modules/sha1/pkgIndex.tcl.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded sha256 1.0.3 [list source [file join $dir sha256.tcl]]
package ifneeded sha1   2.0.3 [list source [file join $dir sha1.tcl]]
package ifneeded sha1   1.1.1 [list source [file join $dir sha1v1.tcl]]











|
|

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Tcl package index file, version 1.1
# This file is generated by the "pkg_mkIndex" command
# and sourced either when an application starts up or
# by a "package unknown" script.  It invokes the
# "package ifneeded" command to set up package-related
# information so that packages will be loaded automatically
# in response to "package require" commands.  When this
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.

if {![package vsatisfies [package provide Tcl] 8.2]} {return}
package ifneeded sha256 1.0.4 [list source [file join $dir sha256.tcl]]
package ifneeded sha1   2.0.4 [list source [file join $dir sha1.tcl]]
package ifneeded sha1   1.1.1 [list source [file join $dir sha1v1.tcl]]
Changes to modules/sha1/sha1.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

[manpage_begin sha1 n 2.0.3]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha1]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2005, Pat Thoyts <[email protected]>}]
[titledesc {SHA1 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha1 [opt 2.0.3]]
[description]
[para]

This package provides an implementation in Tcl of the SHA1
message-digest algorithm as specified by FIPS PUB 180-1 (1). This
algorithm takes a message and generates a 160-bit digest from the
input. The SHA1 algorithm is related to the MD4 algorithm (2) but has
>
|















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
[vset VERSION 2.0.4]
[manpage_begin sha1 n [vset VERSION]]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha1]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2005, Pat Thoyts <[email protected]>}]
[titledesc {SHA1 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha1 [opt [vset VERSION]]]
[description]
[para]

This package provides an implementation in Tcl of the SHA1
message-digest algorithm as specified by FIPS PUB 180-1 (1). This
algorithm takes a message and generates a 160-bit digest from the
input. The SHA1 algorithm is related to the MD4 algorithm (2) but has
Changes to modules/sha1/sha1.tcl.
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
    
    SHA1Update $token [read $channel $chunksize]

    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
        
}

# -------------------------------------------------------------------------

proc ::sha1::sha1 {args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {







|







646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
    
    SHA1Update $token [read $channel $chunksize]

    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
    return
}

# -------------------------------------------------------------------------

proc ::sha1::sha1 {args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {
801
802
803
804
805
806
807
808
809
810
811
812
813
814
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha1 2.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






801
802
803
804
805
806
807
808
809
810
811
812
813
814
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha1 2.0.4

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:
Changes to modules/sha1/sha256.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

[manpage_begin sha256 n 1.0.3]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[see_also sha1]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha256]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2008, Andreas Kupries <[email protected]>}]
[titledesc {SHA256 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha256 [opt 1.0.3]]
[description]
[para]

This package provides an implementation in Tcl of the SHA256 and
SHA224 message-digest algorithms as specified by FIPS PUB 180-1
(1). These algorithms take a message and generates a 256-bit (224-bit)
digest from the input. The SHA2 algorithms are related to the SHA1
>
|
















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[vset VERSION 1.0.4]
[manpage_begin sha256 n [vset VERSION]]
[see_also md4]
[see_also md5]
[see_also ripemd128]
[see_also ripemd160]
[see_also sha1]
[keywords {FIPS 180-1}]
[keywords hashing]
[keywords message-digest]
[keywords {rfc 2104}]
[keywords security]
[keywords sha256]
[moddesc   {SHA-x Message-Digest Algorithm}]
[copyright {2008, Andreas Kupries <[email protected]>}]
[titledesc {SHA256 Message-Digest Algorithm}]
[category  {Hashes, checksums, and encryption}]
[require Tcl 8.2]
[require sha256 [opt [vset VERSION]]]
[description]
[para]

This package provides an implementation in Tcl of the SHA256 and
SHA224 message-digest algorithms as specified by FIPS PUB 180-1
(1). These algorithms take a message and generates a 256-bit (224-bit)
digest from the input. The SHA2 algorithms are related to the SHA1
Changes to modules/sha1/sha256.tcl.
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

    if {![string equal $loaded ""]} {
        foreach c {
            SHA256Init   SHA224Init
            SHA256Final  SHA224Final
            SHA256Update
        } {
            rename ::sha2::$c ::sha2::${c}-${loaded}
        }
    }

    # Activate the new implementation, if there is any.

    if {![string equal $key ""]} {
        foreach c {







|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186

    if {![string equal $loaded ""]} {
        foreach c {
            SHA256Init   SHA224Init
            SHA256Final  SHA224Final
            SHA256Update
        } {
            interp alias {} ::sha2::$c {}
        }
    }

    # Activate the new implementation, if there is any.

    if {![string equal $key ""]} {
        foreach c {
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
    
    SHA256Update $token [read $channel $chunksize]

    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
	return
}

# -------------------------------------------------------------------------

proc ::sha2::_sha256 {ver args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {







|







662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
    
    SHA256Update $token [read $channel $chunksize]

    if {[eof $channel]} {
        fileevent $channel readable {}
        set state(reading) 0
    }
    return
}

# -------------------------------------------------------------------------

proc ::sha2::_sha256 {ver args} {
    array set opts {-hex 0 -filename {} -channel {} -chunksize 4096}
    if {[llength $args] == 1} {
820
821
822
823
824
825
826
827
828
829
830
831
832
833
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha256 1.0.3

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End:







|






820
821
822
823
824
825
826
827
828
829
830
831
832
833
	    SwitchTo $e
	    break
	}
    }
    unset e
}

package provide sha256 1.0.4

# -------------------------------------------------------------------------
# Local Variables:
#   mode: tcl
#   indent-tabs-mode: nil
# End: