Software /
code /
prosody
Changeset
6420:0c070e30a7db
util.random: Switch to SHA512
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Sep 2014 10:16:59 +0200 |
parents | 6417:060b63a27e9b |
children | 6421:c3011ab945b8 |
files | util/random.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/random.lua Wed Sep 17 14:50:44 2014 +0200 +++ b/util/random.lua Thu Sep 18 10:16:59 2014 +0200 @@ -10,7 +10,7 @@ local os_time = os.time; local os_clock = os.clock; local ceil = math.ceil; -local sha1 = require "util.hashes".sha1; +local H = require "util.hashes".sha512; local last_uniq_time = 0; local function uniq_time() @@ -21,7 +21,7 @@ end local function new_random(x) - return sha1(x..os_clock()..tostring({})); + return H(x..os_clock()..tostring({})); end local buffer = new_random(uniq_time());