2020-12-21 15:38:52 +01:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
|
|
|
----
|
|
|
|
import CryptoSwift
|
|
|
|
|
|
|
|
let bytes:Array<UInt8> = [0x01, 0x02, 0x03]
|
|
|
|
let digest = input.md5() // Sensitive
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
----
|
|
|
|
import CryptoSwift
|
|
|
|
|
|
|
|
let bytes:Array<UInt8> = [0x01, 0x02, 0x03]
|
2021-02-16 10:34:10 +01:00
|
|
|
let digest = input.sha512() // Compliant
|
2020-12-21 15:38:52 +01:00
|
|
|
----
|
|
|
|
|
|
|
|
include::../see.adoc[]
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
2021-06-02 20:44:38 +02:00
|
|
|
== Comments And Links
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../comments-and-links.adoc[]
|
2021-06-03 09:05:38 +02:00
|
|
|
endif::env-github,rspecator-view[]
|