From 0af58b5e2d826087f862f7d328796176a055ea29 Mon Sep 17 00:00:00 2001 From: Miguel Oliveira Date: Tue, 13 Dec 2022 18:51:38 -0300 Subject: [PATCH] Improve random byte generator --- random.lua | 109 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 32 deletions(-) diff --git a/random.lua b/random.lua index f2be855..71cfd74 100644 --- a/random.lua +++ b/random.lua @@ -1,3 +1,4 @@ +local expect = require "cc.expect".expect local blake3 = require "ccryptolib.blake3" local chacha20 = require "ccryptolib.chacha20" local packing = require "ccryptolib.internal.packing" @@ -6,6 +7,7 @@ local u1x4, fmt1x4 = packing.compileUnpack("