Skip to content

Commit df455a5

Browse files
refresh
1 parent 4d71701 commit df455a5

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

seguid

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,31 @@
190190

191191

192192
## DON'T EDIT: The source of this part is src/sha1.tcl
193-
##############
194-
## sha1 hashing from tcllib
195-
##############
196-
namespace eval ::sha1 {
193+
## The following SHA-1 code was extracted from the tcllib source code
194+
## https://core.tcl-lang.org/tcllib/raw/b52facec511fa8edea4e8f0d3a71214fe137c179?at=sha1.tcl
195+
196+
##################################################
197+
#
198+
# sha1.tcl - SHA1 in Tcl
199+
# Author: Don Libes <libes@nist.gov>, May 2001
200+
# Version 1.0.3
201+
#
202+
# SHA1 defined by FIPS 180-1, "The SHA1 Message-Digest Algorithm",
203+
# http://www.itl.nist.gov/fipspubs/fip180-1.htm
204+
# HMAC defined by RFC 2104, "Keyed-Hashing for Message Authentication"
205+
#
206+
# Some of the comments below come right out of FIPS 180-1; That's why
207+
# they have such peculiar numbers. In addition, I have retained
208+
# original syntax, etc. from the FIPS. All remaining bugs are mine.
209+
#
210+
# HMAC implementation by D. J. Hagberg <dhagberg@millibits.com> and
211+
# is based on C code in FIPS 2104.
212+
#
213+
# For more info, see: http://expect.nist.gov/sha1pure
214+
#
215+
# - Don
216+
##################################################
217+
namespace eval ::sha1 {
197218
variable K
198219

199220
proc initK {} {
@@ -210,9 +231,7 @@ namespace eval ::sha1 {
210231
}
211232
}
212233
initK
213-
}
214-
215-
234+
}
216235

217236
proc ::sha1::sha1 {msg} {
218237
variable K
@@ -338,9 +357,10 @@ namespace eval ::sha1 {
338357
}
339358

340359

360+
341361
namespace eval seguid {
342362

343-
set version 0.0.2
363+
set version 0.0.2-9001
344364

345365
##################
346366
## Public API

src/seguid.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ source [file join $script_path sha1.tcl]
88

99
namespace eval seguid {
1010

11-
set version 0.0.2
11+
set version 0.0.2-9001
1212

1313
##################
1414
## Public API

0 commit comments

Comments
 (0)