From: CryptoManiac Date: Thu, 11 Feb 2016 10:10:04 +0000 (-0800) Subject: Asymmetric encryption stubs. X-Git-Tag: nvc-v0.5.6~92 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=27275f6bf78b909b253530f77e00206924e54130 Asymmetric encryption stubs. --- diff --git a/src/key.cpp b/src/key.cpp index adafc32..afe63cb 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -6,6 +6,7 @@ #include #include +#include #include "key.h" #include "base58.h" @@ -1092,3 +1093,18 @@ bool CMalleableKeyView::CheckKeyVariant(const CPubKey &R, const CPubKey &vchPubK return true; } +//// Asymmetric encryption + +bool CPubKey::EncryptData(const std::vector& data, std::vector& encrypted) +{ + // TODO + + return true; +} + +bool CKey::DecryptData(const std::vector& encrypted, std::vector& data) +{ + // TODO + + return true; +} diff --git a/src/key.h b/src/key.h index c189090..a3b23fe 100644 --- a/src/key.h +++ b/src/key.h @@ -97,6 +97,9 @@ public: std::vector Raw() const { return vchPubKey; } + + // Encrypt data + bool EncryptData(const std::vector& data, std::vector& encrypted); }; @@ -164,6 +167,9 @@ public: // Reserialize to DER static bool ReserealizeSignature(std::vector& vchSig); + + // Decrypt data + bool DecryptData(const std::vector& encrypted, std::vector& data); }; class CPoint