npm.io
2.0.0 • Published 6 years ago

@projectflame/encryption

Licence
AGPL-3.0-or-later
Version
2.0.0
Deps
3
Size
22 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Security Module that focuses on abstracting security into a single module

Usage

Your key can be anything you want. However for interoperability with other components please keep it to strings.

let {Authentication} = require("@projectflame/encryption)

let auth = new Authentication();

let signupKeys = auth.generate(); auth.add("yourkeyidhere",signupKeys[1],signupKeys[2]); auth.sign("yourkeyidhere","your message here") if(auth.verify("yourkeyidhere","your message here","your signiture here")){ console.log("Verified!") } else { console.log("Messaged Modified or KeyID doesn't exist") } key.eject("yourkeyidhere") key.remove("yourkeyidhere")