Skip to content

Commit

Permalink
Fix typo in security-best-practices (#4620)
Browse files Browse the repository at this point in the history
  • Loading branch information
fspreiss authored Feb 3, 2025
1 parent 46c5fef commit a32eebe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/developer-docs/security/security-best-practices/misc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ actor Randomness {
#### Caveats:
- The method doesn't scale when large amount of random bytes is requested as `raw_rand` must be called for every 32 bytes.

### 2. Using `raw_rand` as seed for a psuedo random number generator (PRNG)
### 2. Using `raw_rand` as seed for a pseudo random number generator (PRNG)

In this Rust example, we seed the the output from `raw_rand` in a known PRNG like ChaCha20 in the `init` and `post_upgrade` hooks and generate randomness by calling the `random_bytes` method.
In this Rust example, we seed the output from `raw_rand` in a known PRNG like ChaCha20 in the `init` and `post_upgrade` hooks and generate randomness by calling the `random_bytes` method.

```rust
use candid::{CandidType, Principal};
Expand Down

0 comments on commit a32eebe

Please sign in to comment.