Module malwaredb_types::utils

source ·
Expand description

Convenience functions to aid with parsing

Traits§

Functions§

  • Convenience function to see if a byte sequence in a buffer matches some other byte sequence
  • Calculate entropy (0-8) for a byte sequence
  • Convenience function for f32 from a buffer with specified [endian] ordering
  • Convenience function for f64 from a buffer with specified [endian] ordering
  • Convenience to see if a smaller byte sequence is in the larger sequence https://stackoverflow.com/questions/35901547/how-can-i-find-a-subsequence-in-a-u8-slice
  • Convenience function for i32 from a buffer with specified [endian] ordering
  • Try to get a String from a byte buffer, get a lossy String if it wasn’t UTF-8, or get a hex string as a last resort.
  • Convenience function for u16 from a buffer with specified [endian] ordering
  • Convenience function for u32 from a buffer with specified [endian] ordering
  • Convenience function for u64 from a buffer with specified [endian] ordering