Skip to content

Commit 8baf8d8

Browse files
authored
Merge pull request #27 from RustCrypto/rename-result-to-finalize
Rename `*result*` to `finalize`
2 parents 7704426 + 3a34a05 commit 8baf8d8

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ block-buffer = { git = "https://github.com/RustCrypto/utils" }
99
crypto-mac = { git = "https://github.com/RustCrypto/traits" }
1010
digest = { git = "https://github.com/RustCrypto/traits" }
1111
hmac = { git = "https://github.com/RustCrypto/MACs" }
12+
salsa20 = { git = "https://github.com/RustCrypto/stream-ciphers" }
1213
sha-1 = { git = "https://github.com/RustCrypto/hashes" }
1314
sha2 = { git = "https://github.com/RustCrypto/hashes" }
15+
stream-cipher = { git = "https://github.com/RustCrypto/traits" }

pbkdf2/src/lib.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
1212
#![cfg_attr(feature = "cargo-clippy", allow(inline_always))]
1313

14-
#[cfg(feature = "parallel")]
15-
extern crate rayon;
16-
17-
#[cfg(feature = "include_simple")]
18-
extern crate base64;
19-
2014
#[cfg(feature = "include_simple")]
2115
#[macro_use]
2216
extern crate std;
@@ -60,15 +54,15 @@ where
6054
BigEndian::write_u32(&mut buf, (i + 1) as u32);
6155
prfc.update(&buf);
6256

63-
let salt = prfc.result().into_bytes();
57+
let salt = prfc.finalize().into_bytes();
6458
xor(chunk, &salt);
6559
salt
6660
};
6761

6862
for _ in 1..c {
6963
let mut prfc = prf.clone();
7064
prfc.update(&salt);
71-
salt = prfc.result().into_bytes();
65+
salt = prfc.finalize().into_bytes();
7266

7367
xor(chunk, &salt);
7468
}

scrypt/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ categories = ["cryptography"]
1111
edition = "2018"
1212

1313
[dependencies]
14-
sha2 = { version = "= 0.9.0-pre", default-features = false }
15-
pbkdf2 = { version = "= 0.4.0-pre", default-features = false, path = "../pbkdf2" }
16-
hmac = "= 0.8.0-pre"
14+
base64 = { version = "0.9", optional = true }
1715
byte-tools = "0.3"
1816
byteorder = { version = "1", default-features = false }
19-
20-
subtle = { version = "2", default-features = false , optional = true }
21-
base64 = { version = "0.9", optional = true }
17+
hmac = "= 0.8.0-pre"
18+
pbkdf2 = { version = "= 0.4.0-pre", default-features = false, path = "../pbkdf2" }
2219
rand = { version = "0.5", optional = true }
20+
sha2 = { version = "= 0.9.0-pre", default-features = false }
21+
salsa20 = "= 0.5.0-pre"
22+
subtle = { version = "2", default-features = false , optional = true }
2323

2424
[features]
2525
default = ["include_simple"]

0 commit comments

Comments
 (0)