rspec/rules/S2070/swift/rule.adoc
2021-06-02 20:44:38 +02:00

29 lines
475 B
Plaintext

include::../description.adoc[]
== Noncompliant Code Example
----
import CryptoSwift
let bytes:Array<UInt8> = [0x01, 0x02, 0x03]
let digest = input.md5() // Noncompliant
----
== Compliant Solution
----
import CryptoSwift
let bytes:Array<UInt8> = [0x01, 0x02, 0x03]
let digest = input.sha256() // Compliant
----
include::../see.adoc[]
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::rspecator-view[]