comments
authorClaus Gittinger <cg@exept.de>
Thu, 08 Nov 2007 15:30:53 +0100
changeset 10781 322a34a50825
parent 10780 6223f4f77b47
child 10782 0eb9a61f1e32
comments
SHA1Stream.st
--- a/SHA1Stream.st	Thu Nov 08 13:30:16 2007 +0100
+++ b/SHA1Stream.st	Thu Nov 08 15:30:53 2007 +0100
@@ -9,10 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
-
-
-
 "{ Package: 'stx:libbasic' }"
 
 HashStream subclass:#SHA1Stream
@@ -333,18 +329,18 @@
 
 examples
 "
-    Test Vectors (from FIPS PUB 180-1)
+    Test Vectors (from FIPS PUB 180-1); results are:
 
     'abc'
-      A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
+    -> A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
 
     'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq'
-      84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
+    -> 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
 
     A million repetitions of 'a'
-      34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
+    -> 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
 
-								[exBegin]
+                                                                [exBegin]
     |hashStream|
 
     hashStream := SHA1Stream new.
@@ -352,16 +348,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|
 
     hahValue := SHA1Stream hashValueOf:'abc'.
     hashValue printOn:Transcript base:16. Transcript cr.
-								[exEnd]
+                                                                [exEnd]
 
-								[exBegin]
+                                                                [exBegin]
     |hashStream|
 
     hashStream := SHA1Stream new.
@@ -370,47 +366,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]
 "
 ! !
 
@@ -682,7 +678,7 @@
 !SHA1Stream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.12 2006-06-14 15:53:56 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SHA1Stream.st,v 1.13 2007-11-08 14:30:53 cg Exp $'
 ! !
 
 SHA1Stream initialize!