Socket
Book a DemoInstallSign in
Socket

hash-the-timestamp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hash-the-timestamp

Tiny utility to hash the timestamp

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

hash-the-timestamp Build Status Coverage Status

Tiny utility to hash the timestamp

A lightweight library to efficiently hash the timestamp.

  • Simple API
  • Uses secure SHA512 hashes
  • Useful for blockchain
  • Works in the browser and on the server
  • Fully tested, 100% test coverage

Install

$ npm install --save hash-the-timestamp

Usage

const hashTheTimestamp = require('hash-the-timestamp');

hashTheTimestamp(new Date('2018-06-20 10:00:00 UTC+1'));
//=> '3a8828cb5f8dbd44f3165f3e733aac831ed164c9665e8c6e2e1b728f61db97bb7d920e3510b3c48d1a03f323d1d13c982ac9de4f3ff277f6a6fb55e34cc62c97'

API

hashTheTimestamp(timestamp)

Return value: The hash of the timestamp

timestamp

Type: number

The timestamp you want to hash.

Contributing

Pull requests welcome! Please include tests and follow the style conventions. Run npm test to verify

License

MIT © Jonny Burger

Keywords

hash

FAQs

Package last updated on 21 Jun 2018

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