diff dcrypt/crypto/prngs/PBKDF2.d @ 32:2b4bccdc8387

Added version() statements to play nice with D2's current feelings about const. Changed a few methods (addEntropy and read in the base PRNG class, and the constructor for ParametersWithIV) to accept void[] in place of ubyte[].
author Thomas Dixon <reikon@reikon.us>
date Tue, 12 May 2009 22:09:33 -0400
parents 21847420b1ac
children b9f8aa42a547
line wrap: on
line diff
--- a/dcrypt/crypto/prngs/PBKDF2.d	Tue May 12 17:10:47 2009 -0400
+++ b/dcrypt/crypto/prngs/PBKDF2.d	Tue May 12 22:09:33 2009 -0400
@@ -69,16 +69,18 @@
         _initialized = true;
     }
     
-    void addEntropy(ubyte[] input)
+    void addEntropy(void[] input)
     {
-        throw new NotSupportedError(name()~": Not supported.");
+        throw new NotSupportedError(name()~": addEntropy is not supported.");
     }
     
     /**
      * Throws: LimitReachedError after 2^32 blocks.
      */
-    uint read(ubyte[] output)
+    uint read(void[] output_)
     {
+        ubyte[] output = cast(ubyte[])output_;
+        
         for (uint i = 0; i < output.length; i++)
         {
             if (index == buffer.length)