UNPKG

@onereach/orest-input-cli

Version:

The tool for creating, serving, and publishing OREST Inputs

25 lines (19 loc) 487 B
const os = require('os'); const { SHA3 } = require('sha3'); const hash = new SHA3(256); function getFingerprint() { const info = { arch: os.arch(), endianness: os.endianness(), homedir: os.homedir(), hostname: os.hostname(), platform: os.platform(), tmpdir: os.tmpdir(), totalmem: os.totalmem(), type: os.type(), userInfo: os.userInfo(), }; hash.update(JSON.stringify(info)); return hash.digest('hex'); } module.exports = getFingerprint;