Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Janis Erdmanis committed Aug 31, 2024
1 parent 76a8a27 commit 3d1e07f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Verificatum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Verificatum

import ..CryptoPRG: bitlength, HashSpec
import Random
using Random: AbstractRNG
using Random: AbstractRNG, SamplerBigInt

# The PRG and RO is implemented according to Verificatum verifier specification.
# It would also be valuable to implement Fips 1.4 standart in the future.
Expand Down Expand Up @@ -85,8 +85,10 @@ end

@deprecate Base.rand(prg::PRG, n::Int, N::Int) Base.rand(prg, BigInt, N; n) false
Base.rand(prg::PRG, ::Type{T}; n = bitlength(T)) where T <: Integer = rand(prg, T, 1; n)[1]
Base.rand(rng::PRG, sp::UnitRange{BigInt}) = rand(rng, sp, 1)[1]

function Random.rand!(rng::PRG, a::AbstractArray{T}, sp) where T <: Integer

function Random.rand!(rng::PRG, a::AbstractArray{T}, sp::UnitRange) where T <: Integer

values = rand(rng, BigInt, length(a); n = bitlength(maximum(sp)))

Expand Down

0 comments on commit 3d1e07f

Please sign in to comment.