rspec/rules/S4790/php/rule.adoc

42 lines
680 B
Plaintext
Raw Normal View History

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
----
2021-02-16 10:34:10 +01:00
$hash = md5($data); // Sensitive
$hash = sha1($data); // Sensitive
----
== Compliant Solution
----
2021-02-16 10:34:10 +01:00
// for a password
$hash = password_hash($password, PASSWORD_BCRYPT); // Compliant
// other context
$hash = hash("sha512", $data);
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]