pnger 0.1.1

Cross-platform PNG steganography tool for embedding and extracting payloads
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::fs::File;
use std::io::{self, Read};
use std::path::Path;

/// Read a file from disk
pub fn read_file<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
    let mut file = File::open(path)?;
    let mut buffer = Vec::new();
    file.read_to_end(&mut buffer)?;
    Ok(buffer)
}