Skip to content

Commit

Permalink
Use i64
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Oct 30, 2024
1 parent c314b2d commit 3595118
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/node/ops/crypto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,11 @@ pub fn op_node_dh_compute_secret(
}

#[op2(fast)]
#[smi]
#[number]
pub fn op_node_random_int(
#[smi] min: i32,
#[smi] max: i32,
) -> Result<i32, AnyError> {
#[number] min: i64,
#[number] max: i64,
) -> Result<i64, AnyError> {
let mut rng = rand::thread_rng();
// Uniform distribution is required to avoid Modulo Bias
// https://en.wikipedia.org/wiki/Fisher–Yates_shuffle#Modulo_bias
Expand Down

0 comments on commit 3595118

Please sign in to comment.