File tree 5 files changed +10
-7
lines changed 5 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).
8
8
9
9
You may also find the [ Update Guide] ( UPDATING.md ) useful.
10
10
11
+ ## [ 0.5.4] - 2018-07-11
12
+ ### Platform support
13
+ - Make ` OsRng ` work via WASM/stdweb for WebWorkers
14
+
11
15
## [ 0.5.3] - 2018-06-26
12
16
### Platform support
13
17
- OpenBSD, Bitrig: fix compilation (broken in 0.5.1) (#530 )
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " rand"
3
- version = " 0.5.3 " # NB: When modifying, also modify html_root_url in lib.rs
3
+ version = " 0.5.4 " # NB: When modifying, also modify html_root_url in lib.rs
4
4
authors = [" The Rust Project Developers" ]
5
5
license = " MIT/Apache-2.0"
6
6
readme = " README.md"
Original file line number Diff line number Diff line change 218
218
219
219
#![ doc( html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png" ,
220
220
html_favicon_url = "https://www.rust-lang.org/favicon.ico" ,
221
- html_root_url = "https://docs.rs/rand/0.5.3 " ) ]
221
+ html_root_url = "https://docs.rs/rand/0.5.4 " ) ]
222
222
223
223
#![ deny( missing_docs) ]
224
224
#![ deny( missing_debug_implementations) ]
Original file line number Diff line number Diff line change @@ -1023,9 +1023,9 @@ mod imp {
1023
1023
let result = js ! {
1024
1024
try {
1025
1025
if (
1026
- typeof window === "object" &&
1027
- typeof window . crypto === "object" &&
1028
- typeof window . crypto. getRandomValues === "function"
1026
+ typeof self === "object" &&
1027
+ typeof self . crypto === "object" &&
1028
+ typeof self . crypto. getRandomValues === "function"
1029
1029
) {
1030
1030
return { success: true , ty: 1 } ;
1031
1031
}
@@ -1063,7 +1063,7 @@ mod imp {
1063
1063
OsRngMethod :: Browser => js ! {
1064
1064
try {
1065
1065
let array = new Uint8Array ( @{ len } ) ;
1066
- window . crypto. getRandomValues( array) ;
1066
+ self . crypto. getRandomValues( array) ;
1067
1067
HEAPU8 . set( array, @{ ptr } ) ;
1068
1068
1069
1069
return { success: true } ;
Original file line number Diff line number Diff line change 21
21
#[ cfg( feature="std" ) ] use std:: collections:: HashMap ;
22
22
#[ cfg( all( feature="alloc" , not( feature="std" ) ) ) ] use alloc:: collections:: BTreeMap ;
23
23
24
-
25
24
use super :: Rng ;
26
25
#[ cfg( feature="alloc" ) ] use distributions:: uniform:: { SampleUniform , SampleBorrow } ;
27
26
You can’t perform that action at this time.
0 commit comments