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

secp256k1

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

secp256k1 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

test/.index.js.swn

2

package.json
{
"name": "secp256k1",
"version": "0.0.1",
"version": "0.0.2",
"description": "This module provides native bindings to ecdsa secp256k1 functions",

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

@@ -1,2 +0,2 @@

secp256k1
secp256k1 [![Build Status](https://travis-ci.org/wanderer/secp256k1-node.svg?branch=master)](https://travis-ci.org/wanderer/secp256k1-node)
===

@@ -6,2 +6,34 @@

Usage
===
```javascript
var ecdsa = require('secp256k1'),
sr = require('secure-random');
var privateKey = sr.randomBuffer(32);
//a random message to sign
var msg = sr.randomBuffer(32);
//get the public key in a compressed format
var pubKey = ecdsa.createPublicKey(privateKey, true);
//sign the message
var sig = ecdsa.sign(privateKey, msg);
//verify the signature
if(ecdsa.verify(pubKey, msg, sig)){
console.log("valid signature");
}
```
Test
===
run `npm test`
API
===
secp256k1.verifySecetKey(sercetKey)

@@ -142,2 +174,4 @@ -----------------------------

# NOTES
This will not work on node version 11 yet. Arrays need to have `isolates` for this.

@@ -149,1 +183,2 @@

@@ -0,1 +1,2 @@

//tests against the `ecdsa` module
var ecdsa = require('ecdsa');

@@ -12,3 +13,2 @@ var BigInteger = require('bigi');

//test public key generation
var pubKey;

@@ -15,0 +15,0 @@ var compactSig;

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