Code Monkey home page Code Monkey logo

dimitarpetrov / stegify-flutter-plugin Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 3.0 21.18 MB

Flutter plugin for steganography encoding and decoding files within an image using stegify API

Home Page: https://pub.dev/packages/flutter_stegify

License: MIT License

Kotlin 29.95% Ruby 13.64% Swift 17.47% Objective-C 9.58% Dart 22.39% C 6.34% Shell 0.62%
steganography encoding decoding hiding-information hiding-in-png steganography-encoding stegify flutter-plugin go-mobile

stegify-flutter-plugin's Introduction

stegify-flutter-plugin

Flutter plugin for fully transparent hiding any file within an image using stegify API. This technique is known as LSB (Least Significant Bit) steganography

Demonstration

Carrier Data Result
Original File Encoded File Encoded File

The Result file contains the Data file hidden in it. And as you can see it is fully transparent.

Usage

flutter-stegify plugin offers an easy to use Dart functions for steganography encodin/decoding. The original implementation is in Go and can be found here: stegify

This plugin uses go-mobile for generating platform native bindings and exposes Dart functions which can be used directly in your flutter mobile application!

Importing in your flutter application

In order to import this plugin correctly you need to add the following lines to your settings.gradle:

In the beginning add: include ':steg'

In the end of the file add: project(':steg').projectDir = new File(project(':flutter_stegify').projectDir, 'steg')

Example usage of the plugin can be found here.

API

void encode(String carrierFileName, String dataFileName, String resultFileName) async
void decode(String carrierFileName, String resultFileName) async

encode performs steganography encoding of data file in carrier file and saves the steganography encoded product in new file.

decode performs steganography decoding of data previously encoded by the Encode function. The data is decoded from file carrier and it is saved in separate new file

NOTE: The result file won't have any file extension and therefore it should be specified explicitly in the resultFileName argument.

Prerequisites - Prior version 0.2.0

This steps should not be required starting with version 0.2.0

Since flutter-stegify is exposing Go implementation through flutter plugin some Go dependencies are required:

  • Go is installed
  • go-mobile is installed. Make sure to download the sources in your GOPATH as well with: GO111MODULE=off go get golang.org/x/mobile/cmd/gomobile
  • stegify sources are present in your GOPATH, in order to pull stegify execute GO111MODULE=off go get github.com/DimitarPetrov/stegify

NOTE: stegify does not rely on any external dependencies, therefore it is not a module. This means that go mod support should be explicity disabled by an environment variable: export GO111MODULE=off

Disclaimer

If carrier file is in jpeg or jpg format, after encoding the result file image will be png encoded (therefore it may be bigger in size) despite of file extension inherited from the original carrier file (which is .jpeg or .jpg).

stegify-flutter-plugin's People

Contributors

dimitarpetrov avatar sawin0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stegify-flutter-plugin's Issues

deprecated version of the Android embedding

The plugin flutter_stegify uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

Update kotlin version

Hey I have this error due to the older version of kotlin... can you please update the kotlin version
or, suggest me how I can work around this issue?

Launching lib/main.dart on RMX1801 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':flutter_stegify' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Finished with error: Gradle task assembleDebug failed with exit code 1

And thanks for the great plugin ๐Ÿ‘

Execution failed for task ':steg:gobind'

Launching lib\main.dart on Redmi 8 in debug mode...
Running Gradle task 'assembleDebug'...
C:\Users\yaswa\go\bin\gomobile.exe: no Android NDK found in $ANDROID_HOME/ndk-bundle nor in $ANDROID_NDK_HOME

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':steg:gobind'.
> Process 'command 'C:\Users\yaswa/go/bin\gomobile.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 59s
Exception: Gradle task assembleDebug failed with exit code 1

@DimitarPetrov @sawin0 how to solve this issue?

gradle error in package itself : (

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...

  • Error running Gradle:
    ProcessException: Process "/Users/developer/Documents/repos/test_s/android/gradlew" exited abnormally:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/developer/.pub-cache/hosted/pub.dartlang.org/flutter_stegify-0.0.4/android/build.gradle' line: 58

  • What went wrong:
    A problem occurred evaluating project ':flutter_stegify'.

Project with path ':steg' could not be found in project ':flutter_stegify'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
Command: /Users/developer/Documents/repos/test_s/android/gradlew app:properties

Finished with error: Please review your Gradle project setup in the android/ folder.

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.