pub fn hide_encrypt<T>(
info: T,
carrier_template: &str,
) -> Result<String, HideSomethingError>where
T: ToString,Expand description
Hides the given information into a carrier text.
§Process
- Compress the input string with raw DEFLATE.
- Prepend a 4‑byte big‑endian length prefix.
- Convert the resulting byte vector into a stream of bits (MSB first).
- Repeat the carrier template until it contains at least as many alphabetic characters as there are bits.
- Encode each bit by setting the corresponding alphabetic character to uppercase (bit = 1) or lowercase (bit = 0). Non‑alphabetic characters are left unchanged.
§Errors
Returns HideSomethingError if compression fails, or if the template
contains no alphabetic characters.
§Example
use hide_something::hide_encrypt;
let hidden = hide_encrypt("secret", "Hello World!").unwrap();
assert!(hidden.len() > 0);