nestyle-steganography

1.1.3 • Public • Published

any-steganography

How to use!!!

require libs

const fs = require('fs');
const path = require('path');
const sg = require('any-steganography');

define file paths, this can be from a file upload, etc

const file = path.join(__dirname, 'images', 'test.jpg');
const output = path.join(__dirname, 'images', 'test-with-message.jpg');

Let's write our message into a file

first: read file

const key = '<encryption key with length 128>';
const buffer = sg.write(file, 'message', key);
fs.writeFile(output, buffer, (err) => {
	if (err) {
		console.log(err);
		return;
	}
});

Now let's make sure it worked as expected

decode message

const buffer = fs.readFileSync(output);
const message = steno.decode(buffer, 'jpg', key);
console.log(message);

Package Sidebar

Install

npm i nestyle-steganography

Weekly Downloads

3

Version

1.1.3

License

ISC

Unpacked Size

20.2 kB

Total Files

16

Last publish

Collaborators

  • hwnahm