#buffer #generate #serialization #macro

tampon

Contains SAFE Rust functions, macro and trait to serialize / deserialize data structure and/or object and generate buffer

1 stable release

1.0.0 Jul 16, 2022

#2064 in Data structures

MIT license

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

  1. generate_buffer(...) -> Vec<u8> - Generate a random buffer with specific size and charset.
  2. wipe_buffer(...) - Wipe a sensible buffer to prevent cold boot attack for greater security.
  3. compare_buffer(...) - Compare 2 buffers and return the absolute difference.

Macros

  1. buffer!(...) -> Vec<u8> - VVariadic macro used to create a buffer and serialize compatible variables.
  2. bytes_size!(...) -> usize - Variadic macro used to get the size in bytes of compatible variables to serialize.
  3. serialize!(...) - Variadic macro used to serialize compatible variables into a buffer.
  4. deserialize!(...) - Variadic macro used to deserialize compatible variables from a buffer.

Trait

  1. Tampon - Trait used to serialize / deserialize object.

[^1]: Tampon means buffer in french.

Dependencies