190
190
191
191
192
192
## 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 {
197
218
variable K
198
219
199
220
proc initK {} {
@@ -210,9 +231,7 @@ namespace eval ::sha1 {
210
231
}
211
232
}
212
233
initK
213
- }
214
-
215
-
234
+ }
216
235
217
236
proc ::sha1::sha1 {msg} {
218
237
variable K
@@ -338,9 +357,10 @@ namespace eval ::sha1 {
338
357
}
339
358
340
359
360
+
341
361
namespace eval seguid {
342
362
343
- set version 0.0.2
363
+ set version 0.0.2-9001
344
364
345
365
##################
346
366
## Public API
0 commit comments