Skip to content

asyed94/crypto-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

crypto-utils

Provides a simple interface to cryptographic functions.

// Returns a random 256 bit hex string
randomBits()

// Returns the hash of the obj
hash(obj)

// Generates and retuns {publicKey, secretKey} as hex strings
generateKeypair()

// Returns a signature obtained by signing the obj with the sk
sign(obj, sk)

// Returns true if the object was signed by the owner of the pk
verify(obj, sig, pk)

Install

npm install asyed94/crypto-utils

Use

const cryptoUtils = require('crypto-utils')
let msg = cryptoUtils.hash('Hello world!')
console.log(msg)

About

Provides simple crypto functions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published