Skip to content

Commit 657e4d4

Browse files
geoffw0subatoi
andauthored
Apply suggestions from code review
Co-authored-by: Ben Ahmady <[email protected]>
1 parent 2ab5e6f commit 657e4d4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

swift/ql/src/queries/Security/CWE-328/WeakPasswordHashing.qhelp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<qhelp>
55
<overview>
66
<p>
7-
Using a insufficiently computationally hard hash function can leave data
8-
vulnerable, and should not be used for password hashing.
7+
Hash functions that are not sufficiently computationally hard can leave data vulnerable. You should not use such functions for password hashing.
98
</p>
109

1110
<p>
@@ -34,14 +33,14 @@
3433
</p>
3534

3635
<p>
37-
Password hashing algorithms are designed to be slow and/or memory intenstive to compute, which makes brute force attacks more difficult.
36+
Password hashing algorithms should be slow and/or memory intensive to compute, to make brute force attacks more difficult.
3837
</p>
3938

4039
</overview>
4140
<recommendation>
4241

4342
<p>
44-
Ensure that for password storage you should use a computationally hard cryptographic hash function, such as:
43+
For password storage, you should use a computationally hard cryptographic hash function, such as one of the following:
4544
</p>
4645

4746
<ul>
@@ -63,9 +62,9 @@
6362
<example>
6463

6564
<p>
66-
The following examples show a function that hashes a password using a cryptographic hashing algorithm.
65+
The following examples show two versions of the same function. In both cases, a password is hashed using a cryptographic hashing algorithm.
6766

68-
In the first case the SHA-512 hashing algorithm is used. It is vulnerable to offline brute force attacks:
67+
In the first case, the SHA-512 hashing algorithm is used. It is vulnerable to offline brute force attacks:
6968
</p>
7069
<sample src="WeakPasswordHashingBad.swift"/>
7170
<p>

0 commit comments

Comments
 (0)