2020-06-30 14:41:58 +02:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
|
|
|
----
|
|
|
|
const crypto = require("crypto");
|
|
|
|
|
|
|
|
const hash = crypto.createHash('sha1'); // Sensitive
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
----
|
|
|
|
const crypto = require("crypto");
|
|
|
|
|
2021-02-16 10:34:10 +01:00
|
|
|
const hash = crypto.createHash('sha512'); // Compliant
|
2020-06-30 14:41:58 +02:00
|
|
|
----
|
|
|
|
|
|
|
|
include::../see.adoc[]
|