Crate commonware_utils

Source
Expand description

Leverage common functionality across multiple primitives.

Structs§

  • A set that offers efficient iteration over its elements in priority-ascending order.

Traits§

  • Extension trait to add methods to std::time::SystemTime

Functions§

  • Converts a hexadecimal string to bytes.
  • Converts a hexadecimal string to bytes, stripping whitespace and/or a 0x prefix. Commonly used in testing to encode external test vectors without modification.
  • Hashes the given Bytes using SHA-256.
  • Converts bytes to a hexadecimal string.
  • Compute the maximum value of f (faults) that can be tolerated given n = 3f + 1.
  • Compute the modulo of bytes interpreted as a big-endian integer.
  • Assuming that n = 3f + 1, compute the minimum size of q such that q >= 2f + 1.
  • Computes the union of two byte slices.
  • Concatenate a namespace and a message, prepended by a varint encoding of the namespace length.