diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-05-27 16:05:24 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-28 21:27:41 +0100 |
commit | d02f9995a8b7edb932c61265bef9dfea718a3657 (patch) | |
tree | f3cb658fae2c5688aee9c77dd089abfbca039011 /src/serialization/crypto.h | |
parent | serialization: declare do_serialize specializations before use (diff) | |
download | monero-d02f9995a8b7edb932c61265bef9dfea718a3657.tar.xz |
rct: add serialization machinery to rct types
Diffstat (limited to '')
-rw-r--r-- | src/serialization/crypto.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/serialization/crypto.h b/src/serialization/crypto.h index 3644b0e03..9babe698d 100644 --- a/src/serialization/crypto.h +++ b/src/serialization/crypto.h @@ -37,6 +37,7 @@ #include "crypto/chacha8.h" #include "crypto/crypto.h" #include "crypto/hash.h" +#include "ringct/rctTypes.h" // read template <template <bool> class Archive> @@ -92,3 +93,31 @@ VARIANT_TAG(debug_archive, crypto::secret_key, "secret_key"); VARIANT_TAG(debug_archive, crypto::key_derivation, "key_derivation"); VARIANT_TAG(debug_archive, crypto::key_image, "key_image"); VARIANT_TAG(debug_archive, crypto::signature, "signature"); + +BLOB_SERIALIZER(rct::key); +BLOB_SERIALIZER(rct::key64); +BLOB_SERIALIZER(rct::ctkey); +BLOB_SERIALIZER(rct::ecdhTuple); +BLOB_SERIALIZER(rct::asnlSig); + +VARIANT_TAG(debug_archive, rct::key, "rct::key"); +VARIANT_TAG(debug_archive, rct::key64, "rct::key64"); +VARIANT_TAG(debug_archive, rct::ctkey, "rct::ctkey"); +VARIANT_TAG(debug_archive, rct::ecdhTuple, "rct::ecdhTuple"); +VARIANT_TAG(debug_archive, rct::asnlSig, "rct::asnlSig"); +VARIANT_TAG(debug_archive, rct::rctSig, "rct::rctSig"); + +VARIANT_TAG(binary_archive, rct::key, 0x90); +VARIANT_TAG(binary_archive, rct::key64, 0x91); +VARIANT_TAG(binary_archive, rct::ctkey, 0x92); +VARIANT_TAG(binary_archive, rct::ecdhTuple, 0x93); +VARIANT_TAG(binary_archive, rct::asnlSig, 0x94); +VARIANT_TAG(binary_archive, rct::rctSig, 0x95); + +VARIANT_TAG(json_archive, rct::key, "rct_key"); +VARIANT_TAG(json_archive, rct::key64, "rct_key64"); +VARIANT_TAG(json_archive, rct::ctkey, "rct_ctkey"); +VARIANT_TAG(json_archive, rct::ecdhTuple, "rct_ecdhTuple"); +VARIANT_TAG(json_archive, rct::asnlSig, "rct_asnlSig"); +VARIANT_TAG(json_archive, rct::rctSig, "rct_rctSig"); + |