3.0.3 • Published 2 years ago

code-image-obfuscator v3.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

CODE IMAGE OBFUSCATOR

This library lets you store any data inside any image and retrieve it later. It can be a text, a script or another image. Please use it responsibly! Do not use it for an illegal purpose.

Motivation

Attempt to hide a javascript file during transmission.

Attention

Support only png without transparency. Because the transparency destroy the data

Thanks for npm~lucasmreis

First Steps

  • for install canvas see npm-canvas
  • npm install code-image-obfuscator

Example nodejs:

import fs from 'fs'
import { Save, Load } from 'code-image-obfuscator'

// loading data example
const before = fs.readFileSync('README.md', 'utf8')

// create new img with data
await Save('./photo.png', before, './new-photo.png')

/* to load data from img */
const after = await Load('./new-photo.png')

/* compare data after recovery */
console.log(before == after)

Example browser:

bundleFoundIn => 'code-image-obfuscator/dist/cio.bundle.js'

// loading data example
const before = 'some-data'

// create new img with data
window.cio.Save('element_id_of_img', before, 'element_id_of_canvas')

/* to load data from img */
const after = await window.cio.Load('element_id_of_canvas')

/* compare data after recovery */
console.log(before == after)
3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.4.0

8 years ago

1.3.7

8 years ago

1.3.6

8 years ago

1.3.5

8 years ago

1.3.4

8 years ago

1.3.3

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.0

8 years ago

0.0.0

8 years ago