$ npm install hypercore-sign-libSign hypercore signing requests using public/private key cryptography, and verify the signatures.
The flow is:
npm i -g hypercore-sign-lib
const encryptedKey = await generate(password)Generate a keyPair and encrypt it using password. Returns a buffer.
const response = await sign(request, encryptedKey, password, [publicKey])Sign a request using the key and password combination. If password is not correct, signing will fail.
publicKey is only needed for legacy key support.
const valid = verify(response, signingRequest, publicKey)Veriy response is a valid signature over signingRequest by publicKey.
Apache-2.0