--- a/SHA1Stream.st Sat Jan 25 01:30:52 2014 +0100
+++ b/SHA1Stream.st Sat Jan 25 01:31:18 2014 +0100
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1999-2013 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -39,7 +39,7 @@
} SHA1_CTX;
#if USE_ANSI_C
- void SHA1Transform(unsigned long state[5], unsigned char buffer[64]);
+ void SHA1Transform(unsigned int32 /* long */ state[5], unsigned char buffer[64]);
void SHA1Init(SHA1_CTX* context);
void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len);
void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
@@ -290,7 +290,7 @@
copyright
"
COPYRIGHT (c) 1999-2013 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -338,7 +338,7 @@
"
Test Vectors (from FIPS PUB 180-1); results are:
- [exBegin]
+ [exBegin]
|hashStream|
hashStream := SHA1Stream new.
@@ -346,16 +346,16 @@
hashStream hashValue printOn:Transcript base:16. Transcript cr.
hashStream nextPut:'dbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq'.
hashStream hashValue printOn:Transcript base:16. Transcript cr.
- [exEnd]
+ [exEnd]
- [exBegin]
+ [exBegin]
|hashValue|
hashValue := SHA1Stream hashValueOf:'abc'.
hashValue printOn:Transcript base:16. Transcript cr.
- [exEnd]
+ [exEnd]
- [exBegin]
+ [exBegin]
|hashStream|
hashStream := SHA1Stream new.
@@ -364,47 +364,47 @@
hashStream nextPut:'dbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq' asByteArray.
hashStream hashValue printOn:Transcript base:16. Transcript cr.
- [exEnd]
+ [exEnd]
- [exBegin]
+ [exBegin]
|hashStream|
hashStream := SHA1Stream new.
1000000 timesRepeat:[ hashStream nextPut:$a ].
hashStream hashValue printOn:Transcript base:16. Transcript cr.
- [exEnd]
+ [exEnd]
- [exBegin]
+ [exBegin]
|hashStream|
hashStream := SHA1Stream new.
hashStream nextPut:'a'.
hashStream hashValue printOn:Transcript base:16. Transcript cr.
- [exEnd]
+ [exEnd]
- [exBegin]
+ [exBegin]
|hashStream|
hashStream := SHA1Stream new.
hashStream nextPut:$a.
hashStream hashValue printOn:Transcript base:16. Transcript cr.
- [exEnd]
+ [exEnd]
timing throughput:
- [exBegin]
+ [exBegin]
|hashStream n t|
hashStream := SHA1Stream new.
n := 1000000.
t := Time millisecondsToRun:[
- n timesRepeat:[
- hashStream nextPutAll:'12345678901234567890123456789012345678901234567890'.
- ].
- ].
+ n timesRepeat:[
+ hashStream nextPutAll:'12345678901234567890123456789012345678901234567890'.
+ ].
+ ].
t := (t / 1000) asFloat.
Transcript show:t; show:' seconds for '; show:(50*n/1024) asFloat; showCR:' Kb'.
Transcript show:(n*50/1024 / t); showCR:' Kb/s'
- [exEnd]
+ [exEnd]
"
! !
@@ -428,7 +428,7 @@
hashBlockSize
"return the block size used internally by the compression function"
-
+
^ 64
"Created: / 18.3.1999 / 08:37:10 / stefan"
@@ -582,11 +582,11 @@
!SHA1Stream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.39 2013-08-11 22:25:41 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.40 2014-01-25 00:31:18 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.39 2013-08-11 22:25:41 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.40 2014-01-25 00:31:18 cg Exp $'
! !