Home | History | Annotate | Download | only in util

Lines Matching refs:bytes

29   // Converts an array of big-endian bytes to a hex string.
30 // @param bytes an array of big-endian bytes
33 static const std::string BytesToHexString(const uint8_t* bytes,
36 // Converts a hex string to an array of big-endian bytes. A new byte array
37 // is created at the given bytes pointer, and the number of bytes is returned.
38 // The byte array must be freed using: delete[] bytes.
40 // @param bytes pointer to a byte array that will be created with the
42 // @return the number of bytes in the resulting byte array
44 uint8_t*& bytes);
46 // Converts an integer value to a big-endian array of bytes. A new byte array
47 // is created at the given bytes pointer. There are always 4 bytes in the
48 // array. The byte array must be freed using: delete[] bytes.
50 // @param bytes pointer to a byte array that will be created with the 4-byte
53 uint8_t*& bytes);
55 // Converts a big-endian array of bytes to an unsigned-integer. The given byte
56 // array must contain 4 bytes.
57 // @param bytes a big-endian array of bytes
59 static const uint32_t BigEndianBytesToInt(const uint8_t* bytes);
61 // Generates a random array of bytes with the given length. NULL is returned
63 // using: delete[] bytes.
64 // @param length the number of random bytes to generate
65 // @return an array of random bytes of the given length