1 stable release
1.0.0 | Jul 16, 2022 |
---|
#2306 in Data structures
195KB
782 lines
tampon[^1]
Crate that contains SAFE
Rust functions
, macro
and trait
to serialize / deserialize
data structure and/or object and generate buffer
.
Functions
generate_buffer(...) -> Vec<u8>
- Generate a random buffer with specific size andcharset
.wipe_buffer(...)
- Wipe a sensible buffer to preventcold boot attack
for greater security.compare_buffer(...)
- Compare 2 buffers and return theabsolute difference
.
Macros
buffer!(...) -> Vec<u8>
- VVariadic macro used to create abuffer
andserialize
compatible variables
.bytes_size!(...) -> usize
- Variadic macro used to get the size inbytes
ofcompatible variables
toserialize
.serialize!(...)
- Variadic macro used toserialize
compatible variables
into abuffer
.deserialize!(...)
- Variadic macro used todeserialize
compatible variables
from abuffer
.
Trait
Tampon
- Trait used toserialize / deserialize
object.
[^1]: Tampon
means buffer
in french.