Code Monkey home page Code Monkey logo

simplenanosignaturejs's Introduction

SimpleNanoSignatureJs

SimpleNanoSignatureJs is a simple nano signature tool for node Js

Installation : you need blakejs

npm install blakejs

and download SimpleNanoSignature.js, nacl.js and config.json
or
download the full github repository

you can edit config.json

{
"nacl": "Path to nacljs",
"blakejs": "Path to blakejs"
}

Usage :

const sign = require('./SimpleNanoSignature');

const hash = "AE87C717236320099C9910648832B4B75A1A35C1A505C34248809DCA0C66DCC5"; //data to sign

const privateKey = "A88C4CC79B5E63687DAEB2E58C3A7F9CE13D81F731C37AF30F21E426475EF70E"; //must be an ed25519 based private key

let signature = sign.signBlock(hash, privateKey);  //returns the HEX signature

console.log(signature);

//expected output is "2A53258319D6C1AE3461550156B6ED54C08B03C965394E87E0A3716699F2872C63B607CD9B1D6EABBD5CF9FFC3413D1DF60D57283CE19108AC2A21E6A72C3E0D"

Fully based on the work of anarkrypto
Tweet nacl forked by anarkrypto here

Donation for anarkrypto : nano_3kc8wwut3u8g1kwa6x4drkzu346bdbyqzsn14tmabrpeobn8igksfqkzajbb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.