Small library for text to image steganography.

Related tags

Utilities hips-lib
Overview

hips-lib

GitHub Workflow Status Crates.io

Performs text to image steganography by hinding and retrieving secret text within images or pixel arrays. This is achieved by encoding the secret in the least significant bits of the R, G, B values within the image.

Usage

Include hips-lib in your Cargo.toml:

hips-lib = "0.1.0"

Hide a secret in a vector of pixels:

use hips_lib::{ color::Color, hips::{hide_secret_col, find_secret_col}};

fn main() {
    // Create a vector of four hundred pixels.
    let mut pixels = vec![Color::new(); 400];

    // Your secret text
    let secret = String::from("Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.");

    // Hide the secret in the pixel vector.
    hide_secret_col(&mut pixels, &secret).unwrap();

    // Try to read the secret back from the pixel vector.
    let result = find_secret_col(&pixels);

    // Test the results
    assert_eq!(Some(secret), result);
}

Images

Include the image feature in your Cargo.toml reference.

hips-lib = { version = "0.1.0", features = ["image"]}
use hips_lib::hips::{find_secret_img, hide_secret_img};

fn main() {
    let secret = String::from("Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua.");

    // Hide secret in target image
    let result_img = hide_secret_img("test_images/peppers.png", &secret);
    assert!(result_img.is_ok());

    // Find secret in another image
    let result = find_secret_img("test_images/image_with_secret.png").unwrap();
    assert!(result.is_some());
}
You might also like...
A tool that generates a Sublime Text project file that helps you get started using Scoggle.

README A tool that generates a Sublime Text project file that helps you get started using Scoggle. While Scoggle-Gen may not find every single source

Ruplacer - Find and replace text in source files

Ruplacer - Find and replace text in source files

A small utility for tracking the change in opening and closing of issues in a GitHub repo

A small utility for tracking the change in opening and closing of issues in a GitHub repo. This tool can be used to build visualizations for issue triage over time with the hope of motivating closing more issues than are opened.

A small tool to clone git repositories to a standard location, organised by domain name and path.

A small tool to clone git repositories to a standard location, organised by domain name and path. Runs on BSD, Linux, macOS, Windows, and more.

💫 Small microservice to handle state changes of Kubernetes pods and post them to Instatus or Statuspages

💫 Kanata Small microservice to handle state changes of Kubernetes pods and post to Instatus 🤔 Why? I don't really want to implement and repeat code

This is a small demo to accompany the Tauri + Yew tutorial

Tauri + Yew Demo This is a small demo to accompany the Tauri + Yew tutorial

Small utility to display hour in a binary format on the Novation's Launchpad X.
Small utility to display hour in a binary format on the Novation's Launchpad X.

lpx-binary-clock Small utility to display hour in a binary format on the Novation's Launchpad X. Hours, minutes and seconds are displayed one digit pe

lipsum-cli is a small terminal application written in Rust language.

lipsum-cli is a small terminal application written in Rust language. It's used for generating pseudo-Latin lorem ipsum filler text in terminal.

🦀 Small Tauri SolidJS Example feat. Vite
🦀 Small Tauri SolidJS Example feat. Vite

Tauri Solid Example (2022) Simple Solid(vite) starter running with Tauri. Should hopefully save some time trying to setup Tauri and Solid. Currently c

Comments
  • Not importing correctly

    Not importing correctly

    Hey !

    As I'm trying your crate it seems like something is off when importing.

    In your README file you say to use:

    iris-lib = { version = "0.1.0", features = ["image"]}
    

    and

    use hips_lib::hips::{find_secret_img, hide_secret_img};
    

    But when importing I'm getting error that find_secret_img and hide_secret_img don't exist.

    I can see the functions inside hips.rs file but something is off

    These are my errors image

    My Cargo.toml file image

    I'm not sure what am I missing here.

    Also, love your work !

    opened by unavoidable0100 3
Owner
hewhocopypastes
meh...:ramen:
hewhocopypastes
Rust library to generate word cloud images from text and images !

wordcloud-rs A Rust library to generate word-clouds from text and images! Example Code use std::collections::HashMap; use std::fs; use lazy_static::la

Teo Orthlieb 2 Dec 8, 2022
A Rust library containing a collection of small well-tested primitives.

Gazebo - a library of Rust utilities This library contains a collection of well-tested utilities. Most modules stand alone, but taking a few represent

Meta Incubator 168 Dec 29, 2022
Smolprng - A small PRNG library written in Rust, a translation of SmallPRNG

SmolPRNG This is a small PRNG library/framwork written in pure Rust, that is a translation of another project of mine, SmallPRNG. The main goal of thi

Dustin Kenefake 2 Jan 10, 2022
Massayo is a small proof-of-concept Rust library which removes AV/EDR hooks in a given system DLL

Massayo Massayo is a small proof-of-concept Rust library based on UnhookingPOC, which removes AV/EDR hooks in a given system DLL. I tried to reduce fi

null 53 Dec 21, 2022
Prints the absolute path of all regular files in an unmounted btrfs filesystem image.

btrfs-walk-tut Prints the absolute path of all regular files in an unmounted btrfs filesystem image. Learning about btrfs: Btrfs Basics Series This re

Nishal Kulkarni 2 Feb 3, 2022
Ever wanted to torture your CPU by generating every image possible?

dumpsterfire Ever wanted to torture your CPU by generating every image possible? Well, now you can! This thing is worse than mining Bitcoin, since the

null 2 Jun 14, 2022
image url web-scrapper written in rust

imgs - CLI Webscrapper image url web-scrapper written in rust This is a cli application completely written in rust, it aim is to scrap image-url from

Michael Olayemi 1 Apr 2, 2022
Image optimization using Rust and Vips 🦀

Huffman Image optimization using Rust and Libvips. Requirements You must have the following packages installed before getting started Rust Vips pkg-co

ChronicleHQ 4 Nov 3, 2022
A dynamic image generator.

dynimgen A dynamic image generator. How to use step 1: The designers export the design drawing as an svg file <svg> <rect /> <image src="img.png"

null 29 Jun 14, 2023
A tool that transforms an IMVU badge canvas into a single cohesive image.

IMVU Badge Canvas Image Generator This tool fetches an IMVU user's badge canvas and creates a single unified image representation of it. Instead of ha

Helba 3 Sep 20, 2023