@@ -120,25 +120,25 @@ func testHashMethods(passwd : UnsafeRawBufferPointer, cert: String, encrypted_pa
120120
121121func testMD5UpdateWithData( passwd : String , cert: String , encrypted_passwd : String , account_no : String , credit_card_no : String ) {
122122 var hash = Crypto . Insecure. MD5 ( )
123- hash. update ( data: passwd) // BAD [NOT DETECTED]
124- hash. update ( data: cert) // BAD [NOT DETECTED]
123+ hash. update ( data: passwd) // BAD
124+ hash. update ( data: cert) // BAD
125125 hash. update ( data: encrypted_passwd) // GOOD (not sensitive)
126- hash. update ( data: account_no) // BAD [NOT DETECTED]
127- hash. update ( data: credit_card_no) // BAD [NOT DETECTED]
126+ hash. update ( data: account_no) // BAD
127+ hash. update ( data: credit_card_no) // BAD
128128}
129129
130130func testSHA1UpdateWithData( passwd : String , cert: String , encrypted_passwd : String , account_no : String , credit_card_no : String ) {
131131 var hash = Crypto . Insecure. SHA1 ( )
132- hash. update ( data: passwd) // BAD [NOT DETECTED]
133- hash. update ( data: cert) // BAD [NOT DETECTED]
132+ hash. update ( data: passwd) // BAD
133+ hash. update ( data: cert) // BAD
134134 hash. update ( data: encrypted_passwd) // GOOD (not sensitive)
135- hash. update ( data: account_no) // BAD [NOT DETECTED]
136- hash. update ( data: credit_card_no) // BAD [NOT DETECTED]
135+ hash. update ( data: account_no) // BAD
136+ hash. update ( data: credit_card_no) // BAD
137137}
138138
139139func testSHA256UpdateWithData( passwd : String , cert: String , encrypted_passwd : String , account_no : String , credit_card_no : String ) {
140140 var hash = Crypto . SHA256 ( )
141- hash. update ( data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED]
141+ hash. update ( data: passwd) // BAD, not a computationally expensive hash
142142 hash. update ( data: cert) // GOOD
143143 hash. update ( data: encrypted_passwd) // GOOD (not sensitive)
144144 hash. update ( data: account_no) // GOOD
@@ -147,7 +147,7 @@ func testSHA256UpdateWithData(passwd : String, cert: String, encrypted_passwd :
147147
148148func testSHA384UpdateWithData( passwd : String , cert: String , encrypted_passwd : String , account_no : String , credit_card_no : String ) {
149149 var hash = Crypto . SHA384 ( )
150- hash. update ( data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED]
150+ hash. update ( data: passwd) // BAD, not a computationally expensive hash
151151 hash. update ( data: cert) // GOOD
152152 hash. update ( data: encrypted_passwd) // GOOD (not sensitive)
153153 hash. update ( data: account_no) // GOOD
@@ -156,7 +156,7 @@ func testSHA384UpdateWithData(passwd : String, cert: String, encrypted_passwd :
156156
157157func testSHA512UpdateWithData( passwd : String , cert: String , encrypted_passwd : String , account_no : String , credit_card_no : String ) {
158158 var hash = Crypto . SHA512 ( )
159- hash. update ( data: passwd) // BAD, not a computationally expensive hash [NOT DETECTED]
159+ hash. update ( data: passwd) // BAD, not a computationally expensive hash
160160 hash. update ( data: cert) // GOOD
161161 hash. update ( data: encrypted_passwd) // GOOD (not sensitive)
162162 hash. update ( data: account_no) // GOOD
0 commit comments