eckey-util

1.0.4 • Public • Published

ECKey utils

Elliptic curve signature, public and private key generation and public key verification are realized. Signature algorithm ECDSA

npm i eckey-util --save

Create private key

const ECKey = require('eckey-util')
ECKey.createPrivate()

Get public key

ECKey.getPublicKey(privateKey)

Sign

let signed = ECKey.sign('Hello world!', privateKey)

SignHash

let signed = ECKey.signHash(ECKey.createHash('Hello world!'), privateKey)

Verify

ECKey.verify('Hello world!', signed, publicKey)

VerifyHash

ECKey.verifyHash(ECKey.createHash('Hello world!'), Buffer.from(signed, 'hex'), publicKey)

/eckey-util/

    Package Sidebar

    Install

    npm i eckey-util

    Weekly Downloads

    2

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    6.46 kB

    Total Files

    4

    Last publish

    Collaborators

    • drunken