android_steganography
is a simple module for fully transparent hiding any string within an image. This technique is known as LSB (Least Significant Bit) steganography
- API 21 or higher
- Use Android X
Add to root/build.gradle
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
Include the library in your app/build.gradle
dependencies{
compile 'com.github.tuanbaros:android-steganography:master-SNAPSHOT'
}
import tuannt.simple.steganography.Stegy;
Stegy.init("your context");
- Create an
EncodeRequest
EncodeRequest encodeRequest = new EncodeRequest(bitmap, "your message", "your key");
- Encode and callback
Stegy.encodeStringIntoImage(MainActivity.this, encodeRequest, new StegyCallback<Bitmap>() {
@Override
public void onSuccess(Bitmap data) {
// todo
}
@Override
public void onError(String error) {
// todo
}
});
- Create a
DecodeRequest
DecodeRequest decodeRequest = new DecodeRequest(bitmap, "your key");
- Decode and callback
Stegy.decodeStringFromImage(MainActivity.this, decodeRequest, new StegyCallback<String>() {
@Override
public void onSuccess(String data) {
// todo
}
@Override
public void onError(String error) {
// todo
}
});