Skip to content

Commit 5629114

Browse files
sha1 / sha256 - Ticket [8f0ff73083] - Search order tweak.
Search for sha256c package first, then tcllibc. Ordering issues around the stubs table exported by sha256c makes that a better choice. Bumped to version 1.0.6
1 parent 6211386 commit 5629114

File tree

7 files changed

+13
-26
lines changed

7 files changed

+13
-26
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[//000000001]: # (sha256 \- SHA\-x Message\-Digest Algorithm)
33
[//000000002]: # (Generated from file 'sha256\.man' by tcllib/doctools with format 'markdown')
44
[//000000003]: # (Copyright &copy; 2008, Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
5-
[//000000004]: # (sha256\(n\) 1\.0\.5 tcllib "SHA\-x Message\-Digest Algorithm")
5+
[//000000004]: # (sha256\(n\) 1\.0\.6 tcllib "SHA\-x Message\-Digest Algorithm")
66

77
<hr> [ <a href="../../../../toc.md">Main Table Of Contents</a> &#124; <a
88
href="../../../toc.md">Table Of Contents</a> &#124; <a
@@ -44,7 +44,7 @@ sha256 \- SHA256 Message\-Digest Algorithm
4444
# <a name='synopsis'></a>SYNOPSIS
4545

4646
package require Tcl 8\.5 9
47-
package require sha256 ?1\.0\.5?
47+
package require sha256 ?1\.0\.6?
4848

4949
[__::sha2::sha256__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#1)
5050
[__::sha2::sha224__ ?__\-hex&#124;\-bin__? \[ __\-channel channel__ &#124; __\-file filename__ &#124; ?__\-\-__? *string* \]](#2)

idoc/man/files/modules/sha1/sha256.n

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'\" Generated from file 'sha256\&.man' by tcllib/doctools with format 'nroff'
33
'\" Copyright (c) 2008, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
44
'\"
5-
.TH "sha256" n 1\&.0\&.5 tcllib "SHA-x Message-Digest Algorithm"
5+
.TH "sha256" n 1\&.0\&.6 tcllib "SHA-x Message-Digest Algorithm"
66
.\" The -*- nroff -*- definitions below are for supplemental macros used
77
.\" in Tcl/Tk manual entries.
88
.\"
@@ -276,7 +276,7 @@ sha256 \- SHA256 Message-Digest Algorithm
276276
.SH SYNOPSIS
277277
package require \fBTcl 8\&.5 9\fR
278278
.sp
279-
package require \fBsha256 ?1\&.0\&.5?\fR
279+
package require \fBsha256 ?1\&.0\&.6?\fR
280280
.sp
281281
\fB::sha2::sha256\fR ?\fB-hex|-bin\fR? [ \fB-channel channel\fR | \fB-file filename\fR | ?\fB--\fR? \fIstring\fR ]
282282
.sp

idoc/www/tcllib/files/modules/sha1/sha256.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
&#124; <a href="../../../../toc2.html">Applications</a>
110110
] <hr>
111111
<div class="doctools">
112-
<h1 class="doctools_title">sha256(n) 1.0.5 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
112+
<h1 class="doctools_title">sha256(n) 1.0.6 tcllib &quot;SHA-x Message-Digest Algorithm&quot;</h1>
113113
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
114114
<p>sha256 - SHA256 Message-Digest Algorithm</p>
115115
</div>
@@ -133,7 +133,7 @@ <h1 class="doctools_title">sha256(n) 1.0.5 tcllib &quot;SHA-x Message-Digest Alg
133133
<div class="doctools_synopsis">
134134
<ul class="doctools_requirements">
135135
<li>package require <b class="pkgname">Tcl 8.5 9</b></li>
136-
<li>package require <b class="pkgname">sha256 <span class="opt">?1.0.5?</span></b></li>
136+
<li>package require <b class="pkgname">sha256 <span class="opt">?1.0.6?</span></b></li>
137137
</ul>
138138
<ul class="doctools_syntax">
139139
<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>

modules/sha1/pkgIndex.tcl

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
1-
# Tcl package index file, version 1.1
2-
# This file is generated by the "pkg_mkIndex" command
3-
# and sourced either when an application starts up or
4-
# by a "package unknown" script. It invokes the
5-
# "package ifneeded" command to set up package-related
6-
# information so that packages will be loaded automatically
7-
# in response to "package require" commands. When this
8-
# script is sourced, the variable $dir must contain the
9-
# full path name of this file's directory.
10-
111
if {![package vsatisfies [package provide Tcl] 8.5 9]} {return}
12-
package ifneeded sha256 1.0.5 [list source [file join $dir sha256.tcl]]
2+
package ifneeded sha256 1.0.6 [list source [file join $dir sha256.tcl]]
133
package ifneeded sha256c 1.0.5 [list source [file join $dir sha256c.tcl]]
14-
package ifneeded sha1 2.0.5 [list source [file join $dir sha1.tcl]]
15-
package ifneeded sha1 1.1.2 [list source [file join $dir sha1v1.tcl]]
4+
package ifneeded sha1 2.0.5 [list source [file join $dir sha1.tcl]]
5+
package ifneeded sha1 1.1.2 [list source [file join $dir sha1v1.tcl]]

modules/sha1/sha256.man

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[vset VERSION 1.0.5]
1+
[vset VERSION 1.0.6]
22
[manpage_begin sha256 n [vset VERSION]]
33
[see_also md4]
44
[see_also md5]

modules/sha1/sha256.tcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ proc ::sha2::LoadAccelerator {name} {
8383
set r 1
8484
}
8585
critcl {
86-
if {![catch {package require tcllibc}]
87-
|| ![catch {package require sha256c}]} {
86+
if {![catch {package require sha256c}] ||
87+
![catch {package require tcllibc}]} {
8888
set r [expr {[info commands ::sha2::sha256c_update] != {}}]
8989
}
9090
}
@@ -824,7 +824,7 @@ namespace eval ::sha2 {
824824
unset e
825825
}
826826

827-
package provide sha256 1.0.5
827+
package provide sha256 1.0.6
828828

829829
# -------------------------------------------------------------------------
830830
# Local Variables:

modules/sha1/sha256c.tcl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
# (Rewriting the sha1c wrapper to 256).
55
#
66
# Wrapper for the Secure Hashing Algorithm (SHA256)
7-
#
8-
# $Id: sha256c.tcl,v 1.5 2009/05/07 00:35:10 patthoyts Exp $
97

108
package require critcl; # needs critcl
119
# @sak notprovided sha256c
@@ -179,7 +177,6 @@ critcl::api header sha256.h
179177
::critcl::api function void SHA256Init {
180178
SHA256Context *sc
181179
}
182-
183180
::critcl::api function void SHA256Update {
184181
SHA256Context *sc
185182
{const void} *data

0 commit comments

Comments
 (0)