check4anjil / cryptii

Web app and framework offering modular conversion, encoding and encryption

Home Page:https://cryptii.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  • Install the node version specified in .nvmrc.
  • Clone the repository: git clone git@github.com:cryptii/cryptii.git
  • Install dependencies: npm install
  • Build into the dist/ folder: npm run-script build
  • Test source code: npm run-script test
  • Watch files: npm run-script watch

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

Name Category Description
text-transform Transform Transforming character case and arrangement
numeral-system Transform Translates numerals between systems
bitwise-operation Transform Bitwise operations (NOT, AND, OR, …)
morse-code Alphabets Morse code (English)
spelling-alphabet Alphabets Several spelling alphabets
rot13 Simple Substitution ROT13 incl. variants ROT5, ROT18 & ROT47
affine-cipher Simple Substitution Affine Cipher
caesar-cipher Simple Substitution Caesar cipher
atbash Simple Substitution Atbash using latin or hebrew alphabet
vigenere-cipher Simple Substitution Vigenère cipher incl. Beaufort cipher variants
enigma Simple Substitution Enigma machine incl. 13 models
base64 Encoding Base64 incl. variants base64url, …
ascii85 Encoding Ascii85 / Base85 incl. variant Z85
unicode-code-points Encoding Encoding to Unicode code points in given format
url-encoding Encoding URL encoding / Percent-encoding
integer Encoding Translates between bytes and integers
block-cipher Modern cryptography Block ciphers incl. AES
hash Modern cryptography Creating a message digest
hmac Modern cryptography Creating a Hash-based message authentication code

Example usage in code:

let encoder = new ROT13Encoder()
encoder.setSettingValue('variant', 'rot47')
let 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 Chain('🦊🚀')
const b = new Chain([129418, 128640])
const c = new Chain(new Uint8Array([240, 159, 166, 138, 240, 159, 154, 128]))
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()

About

Web app and framework offering modular conversion, encoding and encryption

https://cryptii.com/

License:MIT License


Languages

Language:JavaScript 91.4%Language:CSS 7.7%Language:HTML 0.9%