Skip to content

Commit 1b78823

Browse files
committed
chore: remove nightly feature
1 parent 22f3a44 commit 1b78823

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repository = "https://github.com/Techie-Pi/firebase-scrypt-rust"
55
homepage = "https://github.com/Techie-Pi/firebase-scrypt-rust"
66
documentation = "https://github.com/Techie-Pi/firebase-scrypt-rust"
77
readme = "README.md"
8-
version = "0.1.0"
8+
version = "0.1.1"
99
edition = "2021"
1010
license = "MIT"
1111

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
//! assert!(firebase_scrypt.verify_password(password, salt, password_hash).unwrap())
2727
//! ```
2828
29-
#![feature(int_log)]
30-
3129
use aes::{Aes256};
3230
use aes::cipher::{KeyIvInit, StreamCipher};
3331
use constant_time_eq::constant_time_eq;
@@ -51,7 +49,7 @@ fn generate_derived_key<'a>(
5149
rounds: u32,
5250
mem_cost: u32,
5351
) -> Result<[u8; 64], DerivedKeyError> {
54-
let log2_n = 2_u32.pow(mem_cost).log(2);
52+
let log2_n = 2_f32.powf(mem_cost as f32).log2().floor() as u32;
5553
let p: u32 = 1;
5654

5755
debug_assert!(log2_n < 64, "log2 of n must not be larger than 64");

0 commit comments

Comments
 (0)