@secrez/crypto
Advanced tools
Comparing version 0.1.0 to 0.1.2
{ | ||
"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)) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
97398
268
- Removedmicrotime@^3.0.0
- Removedmicrotime@3.1.1(transitive)
- Removednode-addon-api@5.1.0(transitive)
- Removednode-gyp-build@4.8.2(transitive)