@@ -10,7 +10,7 @@ namespace Enyim
10
10
/// Calculation found at http://lists.danga.com/pipermail/memcached/2007-April/003846.html, but
11
11
/// it is pretty much available everywhere
12
12
/// </remarks>
13
- public class FNV64 : System . Security . Cryptography . HashAlgorithm , IUIntHashAlgorithm
13
+ public class FNV64 : HashAlgorithm , IUIntHashAlgorithm
14
14
{
15
15
protected const ulong Init = 0xcbf29ce484222325L ;
16
16
protected const ulong Prime = 0x100000001b3L ;
@@ -20,10 +20,10 @@ public class FNV64 : System.Security.Cryptography.HashAlgorithm, IUIntHashAlgori
20
20
/// <summary>
21
21
/// Initializes a new instance of the <see cref="T:FNV64"/> class.
22
22
/// </summary>
23
- public FNV64 ( )
23
+ public FNV64 ( bool initialize )
24
24
{
25
25
//base.HashSize = 64;
26
- Initialize ( ) ;
26
+ if ( initialize ) Initialize ( ) ;
27
27
}
28
28
29
29
/// <summary>
@@ -76,6 +76,8 @@ uint IUIntHashAlgorithm.ComputeHash(byte[] data)
76
76
/// </summary>
77
77
public sealed class FNV64a : FNV64
78
78
{
79
+ public FNV64a ( bool initialize ) : base ( initialize ) { }
80
+
79
81
/// <summary>Routes data written to the object into the <see cref="T:FNV64" /> hash algorithm for computing the hash.</summary>
80
82
/// <param name="array">The input data. </param>
81
83
/// <param name="ibStart">The offset into the byte array from which to begin using data. </param>
@@ -108,9 +110,9 @@ public class FNV1 : HashAlgorithm, IUIntHashAlgorithm
108
110
/// <summary>
109
111
/// Initializes a new instance of the <see cref="T:FNV1a"/> class.
110
112
/// </summary>
111
- public FNV1 ( )
113
+ public FNV1 ( bool initialize )
112
114
{
113
- Initialize ( ) ;
115
+ if ( initialize ) Initialize ( ) ;
114
116
}
115
117
116
118
/// <summary>
@@ -163,6 +165,8 @@ uint IUIntHashAlgorithm.ComputeHash(byte[] data)
163
165
/// </summary>
164
166
public class FNV1a : FNV1
165
167
{
168
+ public FNV1a ( bool initialize ) : base ( initialize ) { }
169
+
166
170
/// <summary>Routes data written to the object into the <see cref="T:FNV1a" /> hash algorithm for computing the hash.</summary>
167
171
/// <param name="array">The input data. </param>
168
172
/// <param name="ibStart">The offset into the byte array from which to begin using data. </param>
@@ -185,6 +189,8 @@ protected override void HashCore(byte[] array, int ibStart, int cbSize)
185
189
/// <remarks>Algorithm found at http://bretm.home.comcast.net/hash/6.html</remarks>
186
190
public class ModifiedFNV : FNV1a
187
191
{
192
+ public ModifiedFNV ( bool initialize ) : base ( initialize ) { }
193
+
188
194
/// <summary>
189
195
/// Returns the computed <see cref="T:ModifiedFNV" /> hash value after all data has been written to the object.
190
196
/// </summary>
0 commit comments