File tree 3 files changed +10
-14
lines changed
3 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,7 @@ block-buffer = { git = "https://github.com/RustCrypto/utils" }
9
9
crypto-mac = { git = " https://github.com/RustCrypto/traits" }
10
10
digest = { git = " https://github.com/RustCrypto/traits" }
11
11
hmac = { git = " https://github.com/RustCrypto/MACs" }
12
+ salsa20 = { git = " https://github.com/RustCrypto/stream-ciphers" }
12
13
sha-1 = { git = " https://github.com/RustCrypto/hashes" }
13
14
sha2 = { git = " https://github.com/RustCrypto/hashes" }
15
+ stream-cipher = { git = " https://github.com/RustCrypto/traits" }
Original file line number Diff line number Diff line change 11
11
#![ doc( html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png" ) ]
12
12
#![ cfg_attr( feature = "cargo-clippy" , allow( inline_always) ) ]
13
13
14
- #[ cfg( feature = "parallel" ) ]
15
- extern crate rayon;
16
-
17
- #[ cfg( feature = "include_simple" ) ]
18
- extern crate base64;
19
-
20
14
#[ cfg( feature = "include_simple" ) ]
21
15
#[ macro_use]
22
16
extern crate std;
@@ -60,15 +54,15 @@ where
60
54
BigEndian :: write_u32 ( & mut buf, ( i + 1 ) as u32 ) ;
61
55
prfc. update ( & buf) ;
62
56
63
- let salt = prfc. result ( ) . into_bytes ( ) ;
57
+ let salt = prfc. finalize ( ) . into_bytes ( ) ;
64
58
xor ( chunk, & salt) ;
65
59
salt
66
60
} ;
67
61
68
62
for _ in 1 ..c {
69
63
let mut prfc = prf. clone ( ) ;
70
64
prfc. update ( & salt) ;
71
- salt = prfc. result ( ) . into_bytes ( ) ;
65
+ salt = prfc. finalize ( ) . into_bytes ( ) ;
72
66
73
67
xor ( chunk, & salt) ;
74
68
}
Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ categories = ["cryptography"]
11
11
edition = " 2018"
12
12
13
13
[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 }
17
15
byte-tools = " 0.3"
18
16
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" }
22
19
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 }
23
23
24
24
[features ]
25
25
default = [" include_simple" ]
You can’t perform that action at this time.
0 commit comments