@@ -24,9 +24,9 @@ perform actions that would otherwise be beyond their reach. For instance, if an
24
24
predict a newly generated user's random password, they would gain unauthorized access to that user's
25
25
account.
26
26
27
- For Ruby, ` SecureRandom` provides a cryptographically secure pseudo-random number generator.
28
- ` rand` is not cryptographically secure, and should be avoided in security contexts.
29
- For contexts which are not security sensitive, Random may be preferable as it has a more convenient
27
+ For Ruby, < code > SecureRandom</ code > provides a cryptographically secure pseudo-random number generator.
28
+ < code > rand</ code > is not cryptographically secure, and should be avoided in security contexts.
29
+ For contexts which are not security sensitive, < code > Random</ code > may be preferable as it has a more convenient
30
30
interface.
31
31
32
32
</p >
@@ -37,11 +37,11 @@ interface.
37
37
The following examples show different ways of generating a password.
38
38
</p >
39
39
40
- <p >The first example uses ` Random.rand()` which is not for security purposes</p >
40
+ <p >The first example uses < code > Random.rand()</ code > which is not for security purposes</p >
41
41
42
42
<sample src =" examples/InsecureRandomnessBad.rb" />
43
43
44
- <p >In the second example, the password is generated using ` SecureRandom.random_bytes` which is a
44
+ <p >In the second example, the password is generated using < code > SecureRandom.random_bytes()</ code > which is a
45
45
cryptographically secure method.</p >
46
46
47
47
<sample src =" examples/InsecureRandomnessGood.rb" />
0 commit comments