File tree Expand file tree Collapse file tree 6 files changed +24
-67
lines changed
Expand file tree Collapse file tree 6 files changed +24
-67
lines changed Original file line number Diff line number Diff line change 11[target .'cfg(target_family = "wasm")' ]
2- rustflags = [" --cfg=web_sys_unstable_apis" ]
2+ rustflags = [" --cfg=web_sys_unstable_apis" , " --cfg=getrandom_backend= \" wasm_js \" " ]
33
44# Enable for testing WASM-only stuff
55[build ]
Original file line number Diff line number Diff line change 11[package ]
22name = " minidisc"
33version = " 0.1.3"
4- edition = " 2021 "
4+ edition = " 2024 "
55homepage = " https://github.com/G2-Games/minidisc-rs/"
66repository = " https://github.com/G2-Games/minidisc-rs/"
77documentation = " https://docs.rs/cross_usb"
@@ -28,30 +28,29 @@ targets = [
2828crate-type = [" cdylib" , " rlib" ]
2929
3030[dev-dependencies ]
31- tokio-test = " 0.4.3 "
31+ tokio-test = " 0.4"
3232
3333[dependencies ]
34- diacritics = " 0.2.0"
35- encoding_rs = " 0.8.33"
36- nofmt = " 1.0.0"
37- once_cell = " 1.18.0"
38- unicode-normalization = " 0.1.22"
39- regex = " 1.10"
34+ diacritics = " 0.2"
35+ encoding_rs = " 0.8"
36+ nofmt = " 1.0"
37+ unicode-normalization = " 0.1"
38+ regex = " 1.11"
4039cross_usb = " 0.4"
41- num-derive = " 0.4.2 "
42- num-traits = " 0.2.14 "
43- rand = " 0.8.5 "
44- getrandom = { version = " 0.2 " , features = [" js " ] }
40+ num-derive = " 0.4"
41+ num-traits = " 0.2"
42+ rand = " 0.9 "
43+ getrandom = { version = " 0.3 " , features = [" wasm_js " ] }
4544des = " 0.8"
4645cbc = " 0.1"
4746ecb = " 0.1"
48- tokio = { version = " 1.36" , features = [" full " , " sync" ] }
49- g2-unicode-jp = " 0.4.1 "
50- thiserror = " 1.0.57 "
51- phf = { version = " 0.11.2 " , features = [" phf_macros" , " macros" ] }
52- byteorder = " 1.5.0 "
53- log = " 0.4.22 "
47+ tokio = { version = " 1.36" , features = [" sync" ] }
48+ g2-unicode-jp = " 0.4"
49+ thiserror = " 2.0 "
50+ phf = { version = " 0.12 " , features = [" phf_macros" , " macros" ] }
51+ byteorder = " 1.5"
52+ log = " 0.4"
5453
5554[target .'cfg(target_family = "wasm")' .dependencies ]
5655gloo = { version = " 0.11.0" , features = [" futures" , " worker" ] }
57- futures = " 0.3.30 "
56+ futures = " 0.3"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#![ cfg_attr( debug_assertions, allow( dead_code) ) ]
2+ use std:: sync:: LazyLock ;
23use std:: time:: Duration ;
34
4- use once_cell:: sync:: Lazy ;
55use thiserror:: Error ;
66
77// USB stuff
@@ -67,7 +67,7 @@ pub static DEVICE_IDS: &[DeviceId] = &[
6767}
6868
6969/// Device IDs for use with [cross_usb]
70- pub static DEVICE_IDS_CROSSUSB : Lazy < Box < [ cross_usb:: DeviceFilter ] > > = Lazy :: new ( || {
70+ pub static DEVICE_IDS_CROSSUSB : LazyLock < Box < [ cross_usb:: DeviceFilter ] > > = LazyLock :: new ( || {
7171 DEVICE_IDS
7272 . iter ( )
7373 . map ( |d| {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ impl Encryptor {
3636
3737 // Create the random key
3838 let mut random_key = [ 0u8 ; 8 ] ;
39- rand:: thread_rng ( ) . fill_bytes ( & mut random_key) ;
39+ rand:: rng ( ) . fill_bytes ( & mut random_key) ;
4040
4141 // Encrypt it with the kek
4242 let mut encrypted_random_key = random_key;
@@ -101,7 +101,7 @@ impl Encryptor {
101101
102102 // Create the random key
103103 let mut random_key = [ 0u8 ; 8 ] ;
104- rand:: thread_rng ( ) . fill_bytes ( & mut random_key) ;
104+ rand:: rng ( ) . fill_bytes ( & mut random_key) ;
105105
106106 // Encrypt it with the kek
107107 let mut encrypted_random_key = random_key;
Original file line number Diff line number Diff line change @@ -1958,7 +1958,7 @@ impl<'a> MDSession<'a> {
19581958 )
19591959 . await ?;
19601960 let mut nonce = vec ! [ 0u8 ; 8 ] ;
1961- rand:: thread_rng ( ) . fill_bytes ( & mut nonce) ;
1961+ rand:: rng ( ) . fill_bytes ( & mut nonce) ;
19621962
19631963 let mut devnonce = self . md . session_key_exchange ( nonce. clone ( ) ) . await ?;
19641964 nonce. append ( & mut devnonce) ;
You can’t perform that action at this time.
0 commit comments