From 3f962e9b13bdc4b09b15b3b59155545126dd263f Mon Sep 17 00:00:00 2001 From: subtly Date: Sat, 18 Oct 2014 05:50:39 +0200 Subject: [PATCH] vector_ref tobytes are const --- libdevcrypto/EC.cpp | 2 +- libdevcrypto/ECIES.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libdevcrypto/EC.cpp b/libdevcrypto/EC.cpp index e985b50c5..2912ff6d3 100644 --- a/libdevcrypto/EC.cpp +++ b/libdevcrypto/EC.cpp @@ -32,7 +32,7 @@ #include #pragma warning(pop) #pragma GCC diagnostic pop -#include "EC.H" +#include "EC.h" using namespace std; using namespace dev::crypto; diff --git a/libdevcrypto/ECIES.cpp b/libdevcrypto/ECIES.cpp index 8d63ee752..caab00fea 100644 --- a/libdevcrypto/ECIES.cpp +++ b/libdevcrypto/ECIES.cpp @@ -40,7 +40,7 @@ void ECIESEncryptor::encrypt(bytes& _message) std::string c; StringSource ss(_message.data(), _message.size(), true, new PK_EncryptorFilter(PRNG(), m_encryptor, new StringSink(c))); bzero(_message.data(), _message.size() * sizeof(byte)); - _message = std::move(bytesRef(c).toBytes()); + _message = std::move(bytesConstRef(c).toBytes()); } ECIESDecryptor::ECIESDecryptor(ECKeyPair* _k) @@ -53,6 +53,6 @@ bytes ECIESDecryptor::decrypt(bytesConstRef& _c) { std::string p; StringSource ss(_c.data(), _c.size(), true, new PK_DecryptorFilter(PRNG(), m_decryptor, new StringSink(p))); - return std::move(bytesRef(p).toBytes()); + return std::move(bytesConstRef(p).toBytes()); }