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

doichain

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doichain - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

8

lib/decryptAES.js

@@ -5,4 +5,8 @@ const CryptoJS = require("crypto-js");

const our_password = password ? password : "mnemonic"
const decrypted = CryptoJS.AES.decrypt(encryptedSeedPhrase, our_password);
return decrypted.toString(CryptoJS.enc.Utf8)
try {
const decrypted = CryptoJS.AES.decrypt(encryptedSeedPhrase, our_password)
return decrypted.toString(CryptoJS.enc.Utf8)
} catch(err) {
return ""
}
};

@@ -6,7 +6,2 @@ const bitcoin = require("bitcoinjs-lib")

if(network==undefined) network = networkUtils.DEFAULT_NETWORK
/* const { address } = bitcoin.payments.p2pkh({
pubkey: publicKey,
network: network,
});
return address*/
}
{
"name": "doichain",
"version": "0.0.13",
"version": "0.0.14",
"description": "A js-Doichain library. The goal is to fully cover the Doichain protocoll",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -116,2 +116,5 @@ import chai from 'chai'

chai.assert.equal(decryptedSeedPhrase,SEEDPHRASE,"seed phrase not decrypted")
const decryptedSeedPhrase2 = decryptAES(encryptedSeedPhrase, "wrongPassword")
chai.assert.notEqual(decryptedSeedPhrase2,SEEDPHRASE,"this is completely impossible")
chai.assert.equal(decryptedSeedPhrase2,"","this is not empty")
})

@@ -118,0 +121,0 @@

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