From a254ee99f5c3ffb804fec471c25b7d34893a187b Mon Sep 17 00:00:00 2001 From: Akzhan Abdulin Date: Tue, 10 Oct 2017 15:13:58 +0300 Subject: [PATCH] Use Random::Secure with Crystal::Hasher. --- src/crystal/hasher.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crystal/hasher.cr b/src/crystal/hasher.cr index 670c2edf4afd..ea01fab48421 100644 --- a/src/crystal/hasher.cr +++ b/src/crystal/hasher.cr @@ -1,4 +1,4 @@ -require "crystal/system/random" +require "random/secure" # :nodoc: struct Crystal::Hasher @@ -10,7 +10,7 @@ struct Crystal::Hasher # another algorithm like SipHash or FNV. @@seed = uninitialized UInt64 - Crystal::System::Random.random_bytes(Slice.new(pointerof(@@seed).as(UInt8*), 8)) + Random::Secure.random_bytes(Slice.new(pointerof(@@seed).as(UInt8*), 8)) property result : UInt64 = @@seed