Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mykeels/steganography
This tool lets you hide and retrieve text data to/from an image
https://github.com/mykeels/steganography
cryptography steganography
Last synced: about 2 months ago
JSON representation
This tool lets you hide and retrieve text data to/from an image
- Host: GitHub
- URL: https://github.com/mykeels/steganography
- Owner: mykeels
- Created: 2020-05-02T12:59:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T15:45:39.000Z (almost 2 years ago)
- Last Synced: 2024-10-16T06:34:10.290Z (4 months ago)
- Topics: cryptography, steganography
- Language: JavaScript
- Size: 190 KB
- Stars: 20
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @mykeels/steganography
Inspired by [rodrigouroz/steganography](https://github.com/rodrigouroz/steganography).
This tool lets you hide and retrieve text data to/from an image. It's useful when you want to send information between parties and do not want it scrutinized by external parties.
## Installation
Run `npm i @mykeels/steganography` or `yarn add @mykeels/steganography` to install.
## Usage
To embed data, you'll need an image to embed the data in.
```js
const path = require('path');
const fs = require('fs');
const { embed } = require('@mykeels/steganography');(async () => {
const buffer = await embed(
path.join(__dirname, './path/to/input.png'),
`This is my message to the world. Love, Joy and Happiness!`,
'YOUR_PASSWORD_HERE'
);fs.writeFileSync(
path.join(__dirname, './path/to/output.png'),
buffer
);
})();
```To retrieve data, you'll need an image that has data embeded in it.
```js
const path = require('path');
const { digUp } = require('@mykeels/steganography');(async () => {
const text = await digUp(
path.join(__dirname, './path/to/output.png'),
'YOUR_PASSWORD_HERE'
);console.log(text);
})();
```### NB
- The password argument is optional.