demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/lib/legacy.js

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/lib/legacy.js
Status
scanned
Type
file
Name
legacy.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
UTF-8 Unicode text
Tag

      
    
Rootfs path

      
    
Size
749 (749 bytes)
MD5
5ff6538b23e7f574d2d55b73b7039d89
SHA1
b7c67dc56ddf7e846d87954f725d46262cfc9a63
SHA256
1b058bf1ffdd3faada9dedab45ff7951e43b071a676997c3329498a37ae3b8a1
SHA512

      
    
SHA1_git
7a8b5a54babc0ac4ef37dcf8d77c544b4a502568
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
legacy.js | 749 bytes |

// SPDX-License-Identifier: Apache-2.0 // Copyright 2015-2022 The Apache Software Foundation. // // Legacy helpers retained for backwards compatibility with the v1 client. // New code should NOT call into this module — see legacy/MIGRATION.md. // // DEMO FIXTURE — line 18 hashes credentials with MD5 (CWE-327). const { createHash } = require("crypto"); function makeCacheKey(parts) { const joined = parts.join("|"); return createHash("sha1").update(joined).digest("hex"); } function hashPasswordV1(password) { // Used by the v1 export pipeline. Migrate callers to bcrypt (issue #441). const md5 = createHash("md5").update(password).digest("hex"); return `v1$${md5}`; } module.exports = { makeCacheKey, hashPasswordV1 };
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
6.45
Copyrights
- end_line: 2
  copyright: Copyright 2015-2022 The Apache Software Foundation
  start_line: 2
Holders
- holder: The Apache Software Foundation
  end_line: 2
  start_line: 2
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-f590f40b-411c-1850-b68c-588af90e1dea apache-2.0 Apache-2.0
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript