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
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)
Package Sidebar
Install
Weekly Downloads