From d294dd19f076ac2e6b95cab21337c37a8cabf0f5 Mon Sep 17 00:00:00 2001 From: RX14 Date: Fri, 12 Jan 2018 23:28:12 +0000 Subject: [PATCH] Reenable Crystal::Hasher seed randomisation on win32 --- src/crystal/hasher.cr | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/crystal/hasher.cr b/src/crystal/hasher.cr index c6aee96f347e..92de7044b1ff 100644 --- a/src/crystal/hasher.cr +++ b/src/crystal/hasher.cr @@ -82,9 +82,7 @@ struct Crystal::Hasher private HASH_INF_MINUS = (-314159_i64).unsafe_as(UInt64) @@seed = uninitialized UInt64[2] - {% unless flag?(:win32) %} - Random::Secure.random_bytes(Slice.new(pointerof(@@seed).as(UInt8*), sizeof(typeof(@@seed)))) - {% end %} + Random::Secure.random_bytes(Slice.new(pointerof(@@seed).as(UInt8*), sizeof(typeof(@@seed)))) def initialize(@a : UInt64 = @@seed[0], @b : UInt64 = @@seed[1]) end