Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

machine-digest

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machine-digest

make digest and uuid of the running machine

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34
decreased by-37.04%
Maintainers
1
Weekly downloads
 
Created
Source

machine-digest

Join the chat at https://gitter.im/devfans/machine-digest NPM Version NPM Downloads Build Status Test Coverage

make digest and uuid of the running machine

Features

Get UUID of the running machine, and make sha256 digest of the combined hardware and OS info with custom secret. Supports Linux, MacOS and Windows.

Installation

npm i --save machine-digest

Get Started

const md = require('machine-digest')

const uuid = md.uuid()           // sha256 hex digest of combined info
const UUID = md.UUID()           // sha256 hex digest of only hardware UUID
const rawUUID = md.rawUUID()     // raw hardware UUID

// get summary, default make hex digest
md.get()
{ digest: 'a5d53e51a35755257c3c5fb38f77ec9bd401ab9241803216875de36648c2',
  machine: 
   { OS_TYPE: 'Darwin',
     OS_PLATFORM: 'darwin',
     OS_ARCH: 'x64',
     OS_CPU: 'Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz.Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz.Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz.Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz',
     id: '576D4728-C140-523C-B801-EFE5EIUHF7F9' } }


// get different digests
md.digest('hex')
'542a579ca9357e9797d2e11316689bfbdb52ba51013729b8db56c169a74cc83b'
md.digest('ascii')
'T*W\u001c)5~\u0017\u0017Ra\u0013\u0016h\u001b{[R:Q\u00017)8[VAi\'LH;'

// add or overwrite machine attribute
const attrs = {hostname: os.hostname()}
md.put(attrs)

// change encryption secret
md.secret = "your secret"

Keywords

FAQs

Package last updated on 20 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc