Giter VIP home page Giter VIP logo

affine-cipher-java's Introduction

About Affine-Cipher

Affine cipher is a monoalphabetic substitution cipher.

  • Encryption is done as, E ( x ) = ( a x + b ) mod m modulus m: size of the alphabet a and b: key of the cipher. a and m need to be coprime

  • Decryption is done as, D ( x ) = a^-1 ( x - b ) mod m a^-1 : modular multiplicative inverse of a modulo m

  • This is a generalized code where you can give alphabets of any language using input file and it will perform encryption and decryption in that language

๐Ÿ“ข๐Ÿ“ข You can see the output for Hindi Language,below ๐Ÿ“ข๐Ÿ“ข

GIF

Steps to execute the program for Affine Cipher General:

  • Please save the alphabets of any language in file named as input.txt. This file is input for this program
  • Please save plain text in a file having alphabets from same language as input file. This file is also an input to this program and it's name should be plaintext.txt
  • Enter the value of variable "a" and variable "b" from console
  • You can see the output of encryption and decryption in output.txt file. This file will get generated in "C:\Program Files\Java\jdk-18.0.2.1\bin" location of your system

NOTE: Please execute the program from "C:\Program Files\Java\jdk-18.0.2.1\bin" location of your system. Also save the input.txt file and plaintext.txt file in the same location.

affine-cipher-java's People

Contributors

ayudwi1996 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.