Giter VIP home page Giter VIP logo

gsoc-2022's Introduction

ASSIGNMENT

In this repository you'll find code for an application which aims to support various transposition ciphers. Since the application uses a plugin architecture each cipher should be introduced as a standalone plugin. Your tasks for this assignment are:

Installation

For this project, no dependencies are needed, so the following is all that is needed:

$ python3 setup.py install --user

or

$ python3 setup.py develop --user

Note

You can also install to a virtual environment if you prefer.

Implementation

Plugin interface

Each plugin needs to be implemented as a standalone package located inside the transpose/plugins directory. In order for the plugin to work and be hooked into the main application properly, you'll have to implement the Plugin interface which:

  • inherits from the provided PluginCore abstract class
  • the Plugin class should be instantiated when the plugin's package module is loaded
  • when Plugin is being instantiated it has to register its CLI options with the main singleton CLI parser

Cipher modules

The plugin also comes with the cipher implementation itself. You'll have to create the Vigenere and RailFence classes in the respective plugin modules. Both classes inherit from the Cipher abstract class.

CLI interface

Each of the ciphers has some specifics for which you'll need to provide all necessary CLI options in order for the algorithms to work - you'll need to use the main Parser instance when you're plugin is being registered.

Note that some common CLI options are already provided by the skeleton (and your solution will inherit them automatically), so check the code before wasting time on re-implementing the whole CLI parser!

If everything is hooked up correctly the end result CLI interface should look like the following:

$ transpose --help

usage: transpose [-h] CIPHER ...

transposition cipher tool

positional arguments:
  CIPHER
    vigenere  Vigenere cipher
    rail_fence
              Rail fence cipher

optional arguments:
  -h, --help  show this help message and exit


$ transpose vigenere --help

usage: transpose vigenere [-h] (-c | -d) --key KEY text

positional arguments:
  text           Text to encrypt/decrypt

optional arguments:
  -h, --help     show this help message and exit
  -c, --encrypt  encrypt message
  -d, --decrypt  decrypt message
  ...

NOTES

  • no external libraries are permitted, for this exercise you'll only need modules from the standard Python library
  • the alphabet for the Vigenere cipher should support all printable ASCII characters not just the default A-Z characters you see in Wikipedia
  • your solution should include some suitable error checking
  • bonus points if you also provide some sort of unit tests! :)

gsoc-2022's People

Contributors

eskultety avatar

Watchers

 avatar  avatar

Forkers

mrbazzan

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.