Platform API License: MIT version Donate

Image Steganography

Steganography is the process of hiding a secret message within a larger one in such a way that someone cannot know the presence or contents of the hidden message. Although related, Steganography is not to be confused with Encryption, which is the process of making a message unintelligible—Steganography attempts to hide the existence of communication. The main advantage of steganography algorithm is because of its simple security mechanism. Because the steganographic message is integrated invisibly and covered inside other harmless sources, it is very difficult to detect the message without knowing the existence and the appropriate encoding scheme .

Proposed Algorithm

The algorithm is more dedicated towards the algorithm proposed by Rosziati Ibrahim and Teoh Suk Kuan in their Research Paper published on February 25, 2011.

Encoding Algorithm

Decoding Algorithm

Consider the following encoding, it is totally undetectable by human eyes.

Usage

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Now add the following dependency in your app's build.gradle

dependencies {
      implementation 'com.github.aagarwal1012:Image-Steganography-Library-Android:v1.0'
}

How to encode message into an image ?

Note : Your Activity class should implements TextEncodingCallback interface and also contains its override methods.

public class MainActivity extends AppCompatActivity implements TextEncodingCallback 

Override Methods

public class MainActivity extends AppCompatActivity implements TextDecodingCallback 

Override Methods

ImageSteganography Class

Java attribute Java set methods Description Default Value
Message setMessage(...) , getMessage() Set the value of message, Get the value of message. Null
Secret_Key setSecret_key(...) Set the value of secret key. Null
Image setImage(...) Set the value of image. Null
Encoded_Image getEncoded_image() Get the value of encoded image after text encoding. Null
Encoded isEncoded() Check that the encoding is over or not false
Decoded isDecoded() Check that the decoding is over or not. false
SecretKeyWrong isSecretKeyWrong() Check that the secret key provided was right or wrong but after decoding was done. true

Class Domain Diagram

Example App

There are two options Encode and Decode. In the encode section you can hide a secret message into an image without making any noticeable changes. In the decode section you can extract the message from the encoded image by inserting the correct key.

Note - After pressing the Save button, both the original and encoded images are saved at the location Android/data/com.ayush.steganography/files/Documents/<UUID>/

Encode Decode

Want to contribute !

This is the well documented library. I have documented each and every method that I have used, so have a good read to the code and suggest some changes and new feature to be added in the library.
Feel free to open an issue.

Donate

If you found this project helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Ryan Hayes
Ryan Hayes

🚧 🤔 🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

License

Image Steganography is licensed under MIT license.

MIT License

Copyright (c) 2018 Ayush Agarwal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.