3.0.0 • Published 4 years ago

one-time-pad v3.0.0

Weekly downloads
42
License
MIT
Repository
github
Last release
4 years ago

one-time-pad

a simple one-time pad cipher written in nodejs

Rules for this library

  • The key and message must only contain alphabetical letters.
  • All spaces in message and key will be removed when generating an encrypted message.
  • Punctuation and numbers will not be encrypted (in the future it will)

Usage

const pad = require("one-time-pad");
const secretKey = "ZXYSMMVBSTTVJ";
const encryptedMessage = pad.encrypt("SECRET MESSAGE", secretKey);
console.log(encryptedMessage); // RBAJQFHFKLTBN

const decryptedMessage = pad.decrypt("RBAJQFHFKLTBN", secretKey);
console.log(decryptedMessage); // SECRETMESSAGE

License

MIT

3.0.0

4 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago