Code Monkey home page Code Monkey logo

rot13's Introduction

rot13

Description

History lesson!

One of the earliest effective uses of cryptography was the Caesar cipher, wherein the writer of a message rotated each of the characters forward by a certain number of positions, and the reader rotated them back to decrypt the original meaning.

So if the reader and writer had agreed on rotating by 3 places, then At The Iron Yard would become Dw Wkh Lurq Bdug.

For most Caesar ciphers, the reader has to know which direction to rotate the message's content agreed-upon number of positions, but: if you use a 13-place system (13 being half of a 26-character alphabet), encoding and decoding work in the same way. This system is referred to as ROT13 and is commonly used on the internet to trivially disguise information like movie plot spoilers.

We're going to make a tiny webpage that implements ROT13 -- it'll take in plaintext (either plaintext or encoded), perform the ROT13 operation, and display the ciphertext to the use.

Objectives

Learning Objectives

After completing this assignment, you should...

  • Understand how to use JS to manipulate a webpage
  • Understand how to use TDD to work with a webpage
  • Be able to understand and talk about cryptography intelligently

Performance Objectives

After completing this assignment, you should be able to effectively use:

  • jQuery - listeners, getters, and setters
  • JavaScript in the browser
  • Iteration over arrays

Normal Mode

The provided site has two important files: index.html and index.js.

Modify index.js so that the code

  • listens for users clicking the "Encrypt" button on index.html
  • gets the user's input from the <textarea>
  • leverages the included translateCharacter function to translate all of the text with ROT13
  • sets the <div id='displayText'> content to the translated string

Hard Mode

Normal Mode, but use CSS to make index.html look pretty.

rot13's People

Contributors

pollygee avatar

Watchers

 avatar

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.