#ifndef OPENSSL_HEADER_CRYPTO_TEST_TEST_UTIL_H
#define OPENSSL_HEADER_CRYPTO_TEST_TEST_UTIL_H
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <iosfwd>
#include <string>
#include <vector>
#include <openssl/span.h>
#include "../internal.h"
void hexdump(FILE *fp, const char *msg, const void *in, size_t len);
struct Bytes {
Bytes(const uint8_t *data_arg, size_t len_arg)
: span_(data_arg, len_arg) {}
Bytes(const char *data_arg, size_t len_arg)
: span_(reinterpret_cast<const uint8_t *>(data_arg), len_arg) {}
explicit Bytes(const char *str)
: span_(reinterpret_cast<const uint8_t *>(str), strlen(str)) {}
explicit Bytes(const std::string &str)
: span_(reinterpret_cast<const uint8_t *>(str.data()), str.size()) {}
explicit Bytes(bssl::Span<const uint8_t> span)
: span_(span) {}
bssl::Span<const uint8_t> span_;
};
inline bool operator==(const Bytes &a, const Bytes &b) {
return a.span_ == b.span_;
}
inline bool operator!=(const Bytes &a, const Bytes &b) { return !(a == b); }
std::ostream &operator<<(std::ostream &os, const Bytes &in);
bool DecodeHex(std::vector<uint8_t> *out, const std::string &in);
std::string EncodeHex(bssl::Span<const uint8_t> in);
#endif