demo___customer_pitch-862af2a4-ea65-4b0f-b730-37bd03d5ed98.zip-extract/sources/lib/crypto.js

Path
demo___customer_pitch-862af2a4-ea65-4b0f-b730-37bd03d5ed98.zip-extract/sources/lib/crypto.js
Status
scanned
Type
file
Name
crypto.js
Extension
.js
Programming language
JavaScript
Mime type
text/plain
File type
UTF-8 Unicode text
Tag

      
    
Rootfs path

      
    
Size
539 (539 bytes)
MD5
c93af403bc8786e7c374ce2493c3398f
SHA1
64f215bb3d07057a8146a4521376c881d7e06889
SHA256
5344f72926ba736cd82b39f35d88a3cfaa027afcf17f494ade0b0ef6f77f5fa1
SHA512

      
    
SHA1_git
d6b40e0c0136571cc442031af6e6a16e12efa9d1
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
crypto.js | 539 bytes |

// SPDX-License-Identifier: Apache-2.0 // Copyright 2015-2022 The Apache Software Foundation. // // Token-generation helpers — extracted from an Apache-2.0 utility module. // DEMO FIXTURE — line 8 uses Math.random for token bytes (weak RNG, CWE-330). function makeToken() { return Math.random().toString(36).slice(2, 12); } function shortHash(input) { let h = 0; for (let i = 0; i < input.length; i++) h = ((h << 5) - h + input.charCodeAt(i)) | 0; return h.toString(16); } module.exports = { makeToken, shortHash };
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
11.54
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-f0a9b770-a22a-c0f9-7e4d-81f2f8f90760 apache-2.0 Apache-2.0
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript