diff dcrypt/crypto/Hash.d @ 12:8c7f8fecdd75

Added ManagedBlockCipher, changed Crypto to just import everything, made Hash.update() return itself (for chaining) and ditched BlockCipherWrapper.
author Thomas Dixon <reikon@reikon.us>
date Sat, 30 Aug 2008 14:38:23 -0400
parents cff9960a019c
children 5ce3012f1def
line wrap: on
line diff
--- a/dcrypt/crypto/Hash.d	Wed Aug 20 23:33:02 2008 -0400
+++ b/dcrypt/crypto/Hash.d	Sat Aug 30 14:38:23 2008 -0400
@@ -48,8 +48,10 @@
      * 
      * Params:
      *     input_ = Data to be processed.
+     *     
+     * Returns: Self
      */
-    void update(void[] input_) {
+    Hash update(void[] input_) {
         ubyte[] input = cast(ubyte[]) input_;
         foreach (ubyte i; input) {
             bytes++;
@@ -59,7 +61,7 @@
                 index = 0;
             }   
         }
-            
+        return this;
     }
     
     /** Hash function's internal transformation. */