Giter VIP home page Giter VIP logo

steganography.js's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steganography.js's Issues

t:2 and t:1 does not work

In the JSON example I added (see pull request), I tried to pass option t:2 or t:1 but the encoding (or decoding) fails.

Convert to es6 module

I recently downloaded and converted steganography.js to be an es6 module.
You can see it here:
https://github.com/backspaces/agentscript/blob/master/vendor/steganography.js#L1

I don't know if you are interested in using this sort of thing. I used a simple imagePromise utility import below

export function imagePromise(url) {
    return new Promise((resolve, reject) => {
        const img = new Image()
        img.crossOrigin = 'Anonymous'
        img.onload = () => resolve(img)
        img.onerror = () => reject(`Could not load image ${url}`)
        img.src = url
    })
}

You could remove the dependency, replacing it with that code, or similar.

This isn't just es6 conversion, it corrects a problem with async vs sync image loading:

        loadImg: async function (url) {
            var image = await asutils.imagePromise(url)
            return image
        },

.. which in turn requires async/await which are only available in modules, sigh!

Anyway, if you'd like help with any of this, just ask.

undetectability

I think it would be better if there was no way to tell whether or not a message has been hidden in an image. I guess what the code does now is record certain start and end markers so it is possible to know where the encoded material begins and ends. But how about this:

  1. Make the encoded data start at the very beginning of the pixel data, or at some fixed location after that with no start marker, and place no marker saying where it ends. Needless to say, whatever original noise has not been overwritten should stay intact.
  2. The decode command thus extracts whatever data has been hidden, and after it ends it returns the original noise of the picture. It is up to the user to decide where the hidden data ends.
    The reason for all this is that real steganography is undetectable. If the code adds detectable markers of any kind, the cover is blown.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.