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

@burstjs/crypto

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burstjs/crypto - npm Package Compare versions

Comparing version 0.5.0-beta.11 to 0.5.0-beta.12

4

package.json
{
"name": "@burstjs/crypto",
"version": "0.5.0-beta.11",
"version": "0.5.0-beta.12",
"description": "Cryptographic functions for building Burstcoin apps.",

@@ -59,3 +59,3 @@ "contributors": [

},
"gitHead": "70994f5d94a08cf00c8324784328abea5e688a79",
"gitHead": "ce099787f81cc0c49e1ad0cdbbed931485bfa2e5",
"publishConfig": {

@@ -62,0 +62,0 @@ "access": "public"

@@ -92,2 +92,30 @@ import {generateMasterKeys} from '../generateMasterKeys';

it('should decrypt a text message successfully as owner of message', () => {
const recipientKeys = generateMasterKeys('testSecret_Recipient');
const senderKeys = generateMasterKeys('testSecret_Sender');
// german umlauts to proof UTF-8
const originalMessage = `Die Burstcoin-Blockchain ist ein öffentliches Hauptbuch,
das jede Transaktion aufzeichnet. Es ist vollständig verteilt und funktioniert
ohne eine zentrale vertrauenswürdige Instanz:
Die Blockchain wird von einem Netzwerk von Computern verwaltet,
die als Knoten bezeichnet werden und die Burstcoin-Software ausführen.`;
const encrypted = encryptMessage(
originalMessage,
recipientKeys.publicKey,
senderKeys.agreementPrivateKey
);
const message = decryptMessage(
encrypted,
recipientKeys.publicKey,
senderKeys.agreementPrivateKey
);
expect(message).toEqual(originalMessage);
});
it('should decrypt a text message sent with BRS successfully', () => {

@@ -94,0 +122,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