Giter Site home page Giter Site logo

substitution-cipher's Introduction

Hi there ๐Ÿ‘‹

substitution-cipher's People

Contributors

mrandrewmills avatar

Watchers

 avatar

substitution-cipher's Issues

auto initialize cipherAlphabet when keyword is created?

Currently, you have to invoke buildKeyword() and then buildCipherAlphabet() before you can start encrypting or decrypting. I'm wondering if it wouldn't be better/easier to have buildKeyword() automatically trigger buildCipherAlphabet() automatically.

Thoughts?

encrypt() and decrypt() - better handling of non-alphas?

Currently, any non-alphabetical character gets converted into a space by the encrypt() and decrypt() methods. So, apostrophes, quotes, hyphens, periods, all of that, gets turned into a space character.

How do real-life substitution ciphers handle such things? Need to do more research.

rename distillUniqueUpperAlphas?

Since distillUniqueUpperAlphas is intended to be an internal/private utility function, shouldn't it be renamed to _distillUniqueUpperAlphas?

add JSDoc output?

Just a note to remind myself to create and add JSDoc output later, as time permits.

Remove/Add Spaces

I propose adding two new methods to this class.

The first method would be removeSpaces(). It would filter out any spaces between words, and make it harder for cryptanalysis to identify one or two letter words, which would increase the difficulty of the ciphertext.

The second method would be addSpace(number). It would iterate through the ciphertext characters and add a space at the interval specified in the method argument. So, addSpace(5) would add a space every fifth character, addSpace(1) would add a space between every character.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.