Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Entries are listed in reverse chronological order.

## 2.7.0

* Update `rand` dependency to 0.9

## 2.5.0

* Add constant-timedness note to the documentation for `CtOption::unwrap_or_else`.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "subtle"
# - update html_root_url
# - update README if necessary by semver
# - if any updates were made to the README, also update the module documentation in src/lib.rs
version = "2.6.0"
version = "2.7.0"
edition = "2018"
authors = ["Isis Lovecruft <[email protected]>",
"Henry de Valence <[email protected]>"]
Expand All @@ -26,7 +26,7 @@ exclude = [
travis-ci = { repository = "dalek-cryptography/subtle", branch = "master"}

[dev-dependencies]
rand = { version = "0.8" }
rand = { version = "0.9" }

[features]
const-generics = []
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#![no_std]
#![deny(missing_docs)]
#![doc(html_logo_url = "https://doc.dalek.rs/assets/dalek-logo-clear.png")]
#![doc(html_root_url = "https://docs.rs/subtle/2.6.0")]
#![doc(html_root_url = "https://docs.rs/subtle/2.7.0")]

//! # subtle [![](https://img.shields.io/crates/v/subtle.svg)](https://crates.io/crates/subtle) [![](https://img.shields.io/badge/dynamic/json.svg?label=docs&uri=https%3A%2F%2Fcrates.io%2Fapi%2Fv1%2Fcrates%2Fsubtle%2Fversions&query=%24.versions%5B0%5D.num&colorB=4F74A6)](https://doc.dalek.rs/subtle) [![](https://travis-ci.org/dalek-cryptography/subtle.svg?branch=master)](https://travis-ci.org/dalek-cryptography/subtle)
//!
Expand Down
10 changes: 5 additions & 5 deletions tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::cmp;

use rand::rngs::OsRng;
use rand::RngCore;
use rand::TryRngCore;

use subtle::*;

Expand Down Expand Up @@ -313,8 +313,8 @@ fn unwrap_none_ctoption() {
macro_rules! generate_greater_than_test {
($ty: ty) => {
for _ in 0..100 {
let x = OsRng.next_u64() as $ty;
let y = OsRng.next_u64() as $ty;
let x = OsRng.try_next_u64().unwrap() as $ty;
let y = OsRng.try_next_u64().unwrap() as $ty;
let z = x.ct_gt(&y);

println!("x={}, y={}, z={:?}", x, y, z);
Expand Down Expand Up @@ -375,8 +375,8 @@ fn less_than_twos_compliment_minmax() {
macro_rules! generate_less_than_test {
($ty: ty) => {
for _ in 0..100 {
let x = OsRng.next_u64() as $ty;
let y = OsRng.next_u64() as $ty;
let x = OsRng.try_next_u64().unwrap() as $ty;
let y = OsRng.try_next_u64().unwrap() as $ty;
let z = x.ct_gt(&y);

println!("x={}, y={}, z={:?}", x, y, z);
Expand Down