Add crypto-inventory: a cryptographic inventory of source code as a CycloneDX 1.6 CBOM, with linear cost on hostile input; PKI DER messages in English
This commit is contained in:
1 parent
7d814d1bb8
commit
0f081f0847
49 files changed
+4342
-33
No files matched your search
@@ -0,0 +1,12 @@
|
||||
// Fixtura: algoritmi dati prin variabile care NU se pot rezolva static. Trebuie "unknown", nu ghicit.
|
||||
import crypto from 'node:crypto';
|
||||
|
||||
let alg = 'md5';
|
||||
alg = 'sha256';
|
||||
|
||||
export function h(data, algDinApel, opts) {
|
||||
const a = crypto.createHash(alg); // EXPECT: createHash | unknown
|
||||
const b = crypto.createHash(algDinApel); // EXPECT: createHash | unknown
|
||||
const c = crypto.createCipheriv(opts.cipher, opts.key, opts.iv); // EXPECT: createCipheriv | unknown
|
||||
return [a, b, c, data];
|
||||
}
|
||||
Reference in new issue
Block a user