Skip to content

JavaScript tool for encrypting/decrypting classical ciphers.

License

Notifications You must be signed in to change notification settings

kubakorniluk/cryptos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cryptos

JavaScript tool for encrypting and decrypting classical ciphers.

Instalation

For now, you must clone this repository, install all dependencies (npm install) and run npm run build in the command line. Then include the cryptos.js file from build folder to your document.

<script src="path/to/cryptos.js" type="text/javascript"></script>

In the near future there will be an npm package and CDN version of this library.

Usage

You can use cryptos methods by accessing cryptos object. Then, you must provide cipher name, and method with arguments. Each cipher contains only two methods - encrypt() and decrypt(), but the arguments are different.

cryptos.cipherName.methodName(arguments)

Example:

//encrypt string with Caesar cipher with the shift of 4
cryptos.caesar.encrypt("Hello world!", 4)
//outputs Lipps asvph!
cryptos.caesar.decrypt("Lipps asvph!", 4)
//outputs Hello world!

Planned features

  • Library documentation
  • Vigenère cipher
  • Polybius square cipher
  • Importing ciphers directly from cryptos package e.g. import Caesar from 'cryptos'

Available ciphers

About

JavaScript tool for encrypting/decrypting classical ciphers.

Topics

Resources

License

Stars

Watchers

Forks