Skip to content

Rename *result* to finalize #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2020
Merged
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
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ block-buffer = { git = "https://github.com/RustCrypto/utils" }
crypto-mac = { git = "https://github.com/RustCrypto/traits" }
digest = { git = "https://github.com/RustCrypto/traits" }
hmac = { git = "https://github.com/RustCrypto/MACs" }
salsa20 = { git = "https://github.com/RustCrypto/stream-ciphers" }
sha-1 = { git = "https://github.com/RustCrypto/hashes" }
sha2 = { git = "https://github.com/RustCrypto/hashes" }
stream-cipher = { git = "https://github.com/RustCrypto/traits" }
10 changes: 2 additions & 8 deletions pbkdf2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
#![cfg_attr(feature = "cargo-clippy", allow(inline_always))]

#[cfg(feature = "parallel")]
extern crate rayon;

#[cfg(feature = "include_simple")]
extern crate base64;

#[cfg(feature = "include_simple")]
#[macro_use]
extern crate std;
Expand Down Expand Up @@ -60,15 +54,15 @@ where
BigEndian::write_u32(&mut buf, (i + 1) as u32);
prfc.update(&buf);

let salt = prfc.result().into_bytes();
let salt = prfc.finalize().into_bytes();
xor(chunk, &salt);
salt
};

for _ in 1..c {
let mut prfc = prf.clone();
prfc.update(&salt);
salt = prfc.result().into_bytes();
salt = prfc.finalize().into_bytes();

xor(chunk, &salt);
}
Expand Down
12 changes: 6 additions & 6 deletions scrypt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ categories = ["cryptography"]
edition = "2018"

[dependencies]
sha2 = { version = "= 0.9.0-pre", default-features = false }
pbkdf2 = { version = "= 0.4.0-pre", default-features = false, path = "../pbkdf2" }
hmac = "= 0.8.0-pre"
base64 = { version = "0.9", optional = true }
byte-tools = "0.3"
byteorder = { version = "1", default-features = false }

subtle = { version = "2", default-features = false , optional = true }
base64 = { version = "0.9", optional = true }
hmac = "= 0.8.0-pre"
pbkdf2 = { version = "= 0.4.0-pre", default-features = false, path = "../pbkdf2" }
rand = { version = "0.5", optional = true }
sha2 = { version = "= 0.9.0-pre", default-features = false }
salsa20 = "= 0.5.0-pre"
subtle = { version = "2", default-features = false , optional = true }

[features]
default = ["include_simple"]
Expand Down