mirror of
https://github.com/monero-project/monero.git
synced 2025-08-05 15:44:16 -04:00
Improvements for epee binary to hex functions:
- Performance improvements - Added `span` for zero-copy pointer+length arguments - Added `std::ostream` overload for direct writing to output buffers - Removal of unused `string_tools::buff_to_hex`
This commit is contained in:
parent
9ed496bbc5
commit
4a8f96f95d
14 changed files with 767 additions and 76 deletions
|
@ -47,6 +47,7 @@ extern "C" {
|
|||
#include "crypto/generic-ops.h"
|
||||
#include "crypto/crypto.h"
|
||||
|
||||
#include "hex.h"
|
||||
#include "serialization/serialization.h"
|
||||
#include "serialization/debug_archive.h"
|
||||
#include "serialization/binary_archive.h"
|
||||
|
@ -443,8 +444,7 @@ namespace cryptonote {
|
|||
static inline bool operator!=(const crypto::secret_key &k0, const rct::key &k1) { return memcmp(&k0, &k1, 32); }
|
||||
}
|
||||
|
||||
template<typename T> std::ostream &print256(std::ostream &o, const T &v);
|
||||
inline std::ostream &operator <<(std::ostream &o, const rct::key &v) { return print256(o, v); }
|
||||
inline std::ostream &operator <<(std::ostream &o, const rct::key &v) { epee::to_hex::formatted_from_pod(o, v); return o; }
|
||||
|
||||
|
||||
BLOB_SERIALIZER(rct::key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue