Crate sanitation

Crate sanitation 

Source
Expand description

sanitation is a tool for developing memory-safe programs while detecting and capturing possibly malicious bytes.

Re-exports§

pub use errors::*;
pub use sboolean::*;
pub use sstring::*;
pub use traits::*;

Modules§

errors
errors module contains the Error struct which is used across the sanitation crate to simplify error handling by transforming specific errors from known crates into Error.
sboolean
SBoolean (portmanteau of “Sanitation Boolean”) is a struct providing methods to accept exactly one u8 byte and produce a bool equivalent. As one might expect, SBoolean represents 0u8 as false and 1u8 as true. But more importantly, all other u8 values are accepted as true under the condition of being flagged and stored as potentially malicious, unsafe or a possible covert communication channel.
sstring
SString (portmanteau of “Sanitation String”) is a struct providing methods to take streams of bytes and produce a UTF-8 String, storing invalid UTF-8 byte-sequences and associated metadata for later analysis.
traits
the traits module contains the SafeString.

Functions§

from_hex
to_hex
Converts array of bytes into hexadecimal String representation.