26 lines
399 B
Plaintext
26 lines
399 B
Plaintext
![]() |
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]
|
||
|
let digest = input.sha256() // Compliant
|
||
|
----
|
||
|
|
||
|
include::../see.adoc[]
|