Skip to content

Commit aa1b554

Browse files
authored
Merge pull request #241 from stm32-rs/crypto_rng
Implement rand_core::CryptoRng for the hardware Rng
2 parents 1c7d3db + 3191a4d commit aa1b554

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rng.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use core::cmp;
44

55
use crate::rcc::{Clocks, AHB2};
66
use crate::stm32::RNG;
7-
pub use rand_core::RngCore;
7+
pub use rand_core::{CryptoRng, RngCore};
88

99
/// Extension trait to activate the RNG
1010
pub trait RngExt {
@@ -110,6 +110,8 @@ impl RngCore for Rng {
110110
}
111111
}
112112

113+
impl CryptoRng for Rng {}
114+
113115
#[derive(Debug)]
114116
pub enum Error {}
115117

0 commit comments

Comments
 (0)