Home | History | Annotate | Download | only in net

Lines Matching defs:ByteString

30 class SHILL_EXPORT ByteString {
32 ByteString() {}
33 ByteString(const ByteString& b);
35 explicit ByteString(const std::vector<unsigned char>& data) : data_(data) {}
37 explicit ByteString(size_t length) : data_(length) {}
39 ByteString(const unsigned char* data, size_t length)
42 ByteString(const char* data, size_t length)
45 ByteString(const signed char* data, size_t length)
48 ByteString(const std::string& data, bool copy_terminator)
55 ByteString& operator=(const ByteString& b);
61 // Returns a ByteString containing |length| bytes from the ByteString
64 // this ByteString.
65 ByteString GetSubstring(size_t offset, size_t length) const;
67 // Inserts a uint32_t into a ByteString in cpu-order
68 static ByteString CreateFromCPUUInt32(uint32_t val);
69 // Inserts a uint32_t into a ByteString in network-order
70 static ByteString CreateFromNetUInt32(uint32_t val);
72 // Creates a ByteString from a string of hexadecimal digits where
74 // Returns a default-constructed ByteString if |hex_string| is empty
77 static ByteString CreateFromHexString(const std::string& hex_string);
79 // Converts to a uint32_t from a host-order value stored in the ByteString
82 // Converts to a uint32_t from a network-order value stored in the ByteString
86 // Converts the string of bytes stored in the ByteString from network order
88 // length of ByteString is not a multiple of 4.
91 // Converts the string of bytes stored in the ByteString from host order
93 // length of ByteString is not a multiple of 4.
105 bool BitwiseAnd(const ByteString& b);
111 bool BitwiseOr(const ByteString& b);
116 bool Equals(const ByteString& b) const;
117 void Append(const ByteString& b);
128 static bool IsLessThan(const ByteString& lhs, const ByteString& rhs);
133 // Converts the string of bytes stored in the ByteString by treating it as
136 // ByteString is not a multiple of sizeof(T).