From e52be3a6b82025b6795b73d448381953821d18bb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 15 May 2018 18:24:50 +0200 Subject: Add methods to store/retrieve encrypted user (using argon2 for hash) --- src/Signature.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Signature.cpp') diff --git a/src/Signature.cpp b/src/Signature.cpp index ba3ebde..3d75f24 100644 --- a/src/Signature.cpp +++ b/src/Signature.cpp @@ -105,6 +105,16 @@ namespace odhtdb return *this; } + bool PrivateKey::operator==(const PrivateKey &other) const + { + return memcmp(data, other.data, PRIVATE_KEY_NUM_BYTES) == 0; + } + + bool PrivateKey::operator!=(const PrivateKey &other) const + { + return !operator==(other); + } + string PrivateKey::sign(const DataView &dataToSign) const { string result; -- cgit v1.2.3