Socket
Socket
Sign inDemoInstall

@secrez/crypto

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@secrez/crypto - npm Package Compare versions

Comparing version 0.1.0 to 0.1.2

3

package.json
{
"name": "@secrez/crypto",
"version": "0.1.0",
"version": "0.1.2",
"license": "MIT",

@@ -18,3 +18,2 @@ "publishConfig": {

"bip39": "^3.0.2",
"microtime": "^3.0.0",
"sha3": "^2.1.2",

@@ -21,0 +20,0 @@ "shamir": "^0.7.1",

@@ -5,3 +5,2 @@ const crypto = require('crypto')

const basex = require('base-x')
const microtime = require('microtime')
const shamir = require('shamir')

@@ -106,21 +105,2 @@ const bip39 = require('bip39')

static getTimestampWithMicroseconds() {
let tmp = microtime.nowDouble().toString().split('.')
for (; ;) {
if (tmp[1].length === 6) {
break
}
tmp[1] += '0'
}
tmp = tmp.map(e => parseInt(e))
return tmp
}
static fromTsToDate(ts) {
let [seconds, microseconds] = ts.split('.')
let milliseconds = microseconds.substring(0, 3)
let timestamp = parseInt(seconds) * 1000 + parseInt(milliseconds)
return [(new Date(timestamp)).toISOString(), parseInt(microseconds.substring(3))]
}
static b58Hash(data, size) {

@@ -127,0 +107,0 @@ if (!Buffer.isBuffer(data)) {

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