Giter VIP home page Giter VIP logo

deno-ciphers's Introduction

deno-ciphers

stars issues deno version vr scripts

Encipher and Decipher implementation for Deno.

Implementations

  • Vigenere
  • ADFGVX
  • ADFGX
  • Affine
  • Atbash
  • Autokey
  • Beaufort
  • Caesar
  • ColumnarTransposition
  • FourSquare
  • FractionatedMourse
  • PlayFair
  • PolybiusSqaure
  • Porta
  • RailFence
  • Rot13
  • RunningKey
  • Substitution

Example

import { toVigenere, fromVigenere } from 'mod.ts';

toVigenere("key", "string"); // "CXPSRE"
fromVigenere("key", "CXPSRE"); // "string"

Join Discord

Rules

  • Vigenere

    • key should be alphabetic.
  • ADFGVX

    • key < 36 in length.
    • key should not contain repeated chars.
    • key and keyword should be a valid ascii.
  • ADFGX

    • key < 25 in length.
    • key should not contain repeated chars.
    • key and keyword should be a valid ascii.
  • Affine

    • a should be in the range [1, 25].
    • b should be in the range [1, 25].
    • a should not be relatively prime to 26.
  • Atbash

    • no rules
  • AutoKey

    • key should be alphabetic.
  • Beaufort

    • key should be alphabetic.
  • Caesar

    • no rules
  • ColumnarTransposition

    • key should be a valid ascii.
  • FourSquare

    • alphabet, key1, key2 should be 25 chars in length.
    • alphabet should be a valid ascii.
    • alphabet, key1, key2 should not contain repeated chars.
    • All of the chars in key1 and key2 should be in alphabet.
    • pad should be contained in alphabet.
  • Playfair

    • key should 25 chars in length.
    • key should be a valid ascii.
    • key should not contain repeated characters.
    • pad should not be contained within key.
  • PolybiusSqaure

    • key should be a valid ascii.
    • key should not contain repeated characters.
    • chars should be a valid ascii.
    • chars should not contain repeated characters.
    • length of chars should be equal to sqrt(key.length()), and key should be of length chars.length()^2.
  • Porta

    • key should be alphabetic.
  • RailFence

    • key should not be less than or equal to 0.
  • RunningKey

    • key should be alphabetic.
  • Substitution

    • key should be 26 characters in length.
    • key should not contain repeated chars.
    • key should be alphabetic.

Building from source

Prerequisites

Building

$ deno run -A scripts/build.ts

Testing

Requires wasm.js to be built first.

$ deno test

Contribution

Pull request, issues and feedback are very welcome. Code style is formatted with deno fmt and commit messages are done following Conventional Commits spec.

Licence

Copyright 2020, Divy Srivastava. All rights reserved. MIT license.

deno-ciphers's People

Contributors

littledivy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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