Giter VIP home page Giter VIP logo

cryptii's Introduction

cryptii

Build Status JavaScript Style Guide MIT license

Web app and framework offering modular conversion, encoding and encryption. Translations are done client side without any server interaction — cryptii.com

Getting started

Several quick start options are available:

  • Use the latest live version or download the latest release.
  • Clone the repo: git clone [email protected]:cryptii/cryptii.git
  • Install the node version specified in .nvmrc.
  • Run npm install to install the dependencies.
  • Run npm run-script build to build into the dist/ folder.
  • Run npm run-script test to test the source code.
  • Run npm run-script watch to watch for changes.

Concepts

This framework and web app tries to reflect a wide variety of ciphers, formats, algorithms and methods (called 'bricks') while keeping them easily combinable. There are two categories of bricks: encoders and viewers.

Encoders

Encoders manipulate content by encoding or decoding it in a specific way and using specific settings.

Name Category Description
a1z26 Ciphers Number to letter encoder (A1Z26)
affine-cipher Ciphers Affine Cipher
alphabetical-substitution Ciphers Alphabetical substitution
ascii85 Encoding Ascii85 / Base85 incl. variant Z85
base32 Encoding Base32 incl. variants base32hex, z-base-32, …
base64 Encoding Base64 incl. variants base64url, …
bitwise-operation Transform Bitwise operations (NOT, AND, OR, …)
block-cipher Modern cryptography Block ciphers incl. AES
bootstring Encoding Bootstring
punycode Encoding Punycode
caesar-cipher Ciphers Caesar cipher
case-transform Transform Transforms to upper case, lower case, …
enigma Ciphers Enigma machine incl. 13 models
hash Modern cryptography Creating a message digest
hmac Modern cryptography Creating a Hash-based message authentication code
integer Encoding Translates between bytes and integers
morse-code Alphabets Morse code (English)
numeral-system Transform Translates numerals between systems
polybius-square Polybius square Polybius square
adfgx-cipher Polybius square ADFGX cipher
bifid-cipher Polybius square Bifid cipher
nihilist-cipher Polybius square Nihilist cipher
tap-code Polybius square Tap code
rc4 Modern cryptography RC4 incl. RC4-drop
replace Transform Finds and replaces a given text
reverse Transform Reverses the order of bytes, characters or lines
rot13 Ciphers ROT13 incl. variants ROT5, ROT18 & ROT47
spelling-alphabet Alphabets Several spelling alphabets
trifid-cipher Polybius square Trifid cipher
unicode-code-points Encoding Encoding to Unicode code points in given format
url-encoding Encoding URL encoding / Percent-encoding
vigenere-cipher Ciphers Vigenère cipher incl. Beaufort cipher variants

Example usage:

const bricks = cryptii.BrickFactory.getInstance()
const encoder = bricks.create('rot13')
encoder.setSettingValue('variant', 'rot47')
const result = encoder.encode('Hello World') // returns a Chain object
result.getString() // returns 'w6==@ (@C=5'

Viewers

Viewers allow users to view and edit content in a specific way or format.

Name Category Description
text View Viewing and editing in plain text
bytes View Viewing and editing bytes

Chains

Chain objects encapsulate the actual content used and returned by encoders and viewers. This content can either be a string, an array of Unicode code points or a Uint8Array of bytes.

Chains are immutable. You define its content by passing one of these representations as first argument to the constructor.

const a = new cryptii.Chain('🦊🚀')
const b = new cryptii.Chain([129418, 128640])
const c = new cryptii.Chain(new Uint8Array([240, 159, 166, 138, 240, 159, 154, 128]))
cryptii.Chain.isEqual(a, b, c) // returns true

The object handles the translation between these representations lazily for you. You can access any of these through getter and additional convenience methods.

const string = chain.getString()
const codePoints = chain.getCodePoints()
const bytes = chain.getBytes()

Changelog

See the Releases section of the GitHub repository for changelogs for each release version of cryptii.

cryptii's People

Contributors

ffraenz avatar maxg0 avatar cryptographix avatar

Watchers

James Cloos 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.