npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vapourisation/steganography

v0.0.5-beta.6

Published

This project contains all of the base C++ code that makes up the Steganography application. There is a Node web application that utilises the Node library built by this project

Downloads

3

Readme

C++ Steganography

This project contains all the base C++ code that makes up another application. There is a NodeJS web application that utilises the Node library built by this project

What is this repository for?

  • Provides methods for steganography encoding and decoding across multiple file formats, as of v0.0.1 this is JPEG, PNG, PSD and PDF.

How do I get set up?

  • There is a Dockerfile that, when run, will generate the NodeJS Addon and store it in the /app/steganography/build/Release directory as a steganography.node file. This is then referenced in the index.js file and exported for use in another Node project.
  • You can also just use npm run build to get the built steganography.node module.

Dependencies

  • There are some external dependencies. libjpeg (libjpeg-turbo is recommended) and libpng. png++ and jpeg++ are dependencies but are included in the deps directory.

Testing: TODO

Deployment

  • To deploy, use as part of a further NodeJS application. This can be achieved using Docker or using the npm run build command and install in your Node app.

How to use

These are only examples. You should alter them to better suit your apps needs

When embedding data, this can be directly recovered from files so any data should ideally be encrypted before saving.

From a Node app:

import steganography from 'steganography';
const encoded: string = steganography.encode( input_filepath, text_to_encode, output_filpath );
const decoded: string = steganography.decode( input_filepath );
const phash: string = steganography.getPHash( input_filepath );

For PNGs there are "optional" arguments for bitDepth and channels. This is due to how the underlying library handles PNG files. To make results more consistent and with minimal changes between the input and output, specifying these values means that both files will be essentially identical. It will make a default guess of 8 bit and 3 channels.

From a Node Docker container using the provided Dockerfile as a builder:

Pull built container

docker pull vapourisation/cpp_stegano

FROM vapourisation/cpp_stegano as builder

WORKDIR /app
USER node

COPY --chown=node:node package*.json ./
RUN npm install

Build locally and use

docker build . -t stegano_cpp

FROM stegano_cpp as builder

WORKDIR /app
USER node

COPY --chown=node:node package*.json ./
RUN npm install

Notes on the PHash

You may ask why there is a PHash method, I even initially removed it before publishing because I didn't think it should be in here but after a little testing I realised that for any actual IRL use case, you're going to want to be able to have a failsafe method for checking the integrity of the processed files. The easiest method for this is some form of hash. This could be done on the whole file, but that's easy enough for anyone to do and means that any change will return a false positive even if the actual image itself is exactly the same (visually). This is where a PHash comes in. It preserves a hash of a thumbnail of the visual representation of an image instead of the entire file data itself, this means that smaller changes won't break the hash unless the visuals are changed, which is arguably more important for images.


Please feel free to fork, raise issues or even offer suggestions for things you'd want from this. It's still very early in development and there are so many file formats I would like to include. Supporting all of them is a little tricky, especially JPEG files due to their annoying (but neat) structure.