Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
/ korg87 Public archive

🧐 Encode binary data with KORG 7 on 8 encoding.

License

Notifications You must be signed in to change notification settings

PoneyClairDeLune/korg87

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

korg87

🧐 Encode binary data with KORG 7 on 8 encoding.

This project is a response to How the Great Firewall of China Detects and Blocks Fully Encrypted Traffic, as the encoding scheme used in the project...

  • Cannot have randomness exceed 87.5%.
  • If input can be considered fully random, at around 75% of the bytes are printable.

API

Korg87

.encodeLength(length)

Estimate encode length.

.decodeLength(length)

Estimate decode length.

.encodeBlock(inputSlice, outputSlice)

Encode a 7-byte (or less) block.

.decodeBlock(inputSlice, outputSlice)

Decode a 8-byte (or less) block.

.encodeBytes(inputBuffer, outputBuffer)

Encode Uint8Array.

.decodeBytes(inputBuffer, outputBuffer)

Decode Uint8Array.

.encodeSync(inputBuffer, outputBuffer)

Encode any of ArrayBuffer or TypedArray.

.decodeSync(inputBuffer, outputBuffer)

Encode any of ArrayBuffer or TypedArray.

.encode(inputBuffer, outputBuffer)

Async version of .encodeSync.

.decode(inputBuffer, outputBuffer)

Async version of .decodeSync.