summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Crypto')
-rw-r--r--Swiften/Crypto/CommonCryptoCryptoProvider.cpp18
-rw-r--r--Swiften/Crypto/CommonCryptoCryptoProvider.h15
-rw-r--r--Swiften/Crypto/OpenSSLCryptoProvider.cpp14
-rw-r--r--Swiften/Crypto/OpenSSLCryptoProvider.h15
-rw-r--r--Swiften/Crypto/WindowsCryptoProvider.cpp10
-rw-r--r--Swiften/Crypto/WindowsCryptoProvider.h13
6 files changed, 41 insertions, 44 deletions
diff --git a/Swiften/Crypto/CommonCryptoCryptoProvider.cpp b/Swiften/Crypto/CommonCryptoCryptoProvider.cpp
index 9fbdb2a..d4257e0 100644
--- a/Swiften/Crypto/CommonCryptoCryptoProvider.cpp
+++ b/Swiften/Crypto/CommonCryptoCryptoProvider.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -27,18 +27,18 @@ namespace {
}
}
- ~SHA1Hash() {
+ virtual ~SHA1Hash() override {
}
- virtual Hash& update(const ByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const ByteArray& data) override {
return updateInternal(data);
}
- virtual Hash& update(const SafeByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const SafeByteArray& data) override {
return updateInternal(data);
}
- virtual std::vector<unsigned char> getHash() SWIFTEN_OVERRIDE {
+ virtual std::vector<unsigned char> getHash() override {
assert(!finalized);
std::vector<unsigned char> result(CC_SHA1_DIGEST_LENGTH);
CC_SHA1_Final(vecptr(result), &context);
@@ -68,18 +68,18 @@ namespace {
}
}
- ~MD5Hash() {
+ virtual ~MD5Hash() override {
}
- virtual Hash& update(const ByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const ByteArray& data) override {
return updateInternal(data);
}
- virtual Hash& update(const SafeByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const SafeByteArray& data) override {
return updateInternal(data);
}
- virtual std::vector<unsigned char> getHash() SWIFTEN_OVERRIDE {
+ virtual std::vector<unsigned char> getHash() override {
assert(!finalized);
std::vector<unsigned char> result(CC_MD5_DIGEST_LENGTH);
CC_MD5_Final(vecptr(result), &context);
diff --git a/Swiften/Crypto/CommonCryptoCryptoProvider.h b/Swiften/Crypto/CommonCryptoCryptoProvider.h
index 8fa7fa6..7d1675f 100644
--- a/Swiften/Crypto/CommonCryptoCryptoProvider.h
+++ b/Swiften/Crypto/CommonCryptoCryptoProvider.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -7,19 +7,18 @@
#pragma once
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Swiften/Crypto/CryptoProvider.h>
namespace Swift {
class SWIFTEN_API CommonCryptoCryptoProvider : public CryptoProvider {
public:
CommonCryptoCryptoProvider();
- ~CommonCryptoCryptoProvider();
+ virtual ~CommonCryptoCryptoProvider() override;
- virtual Hash* createSHA1() SWIFTEN_OVERRIDE;
- virtual Hash* createMD5() SWIFTEN_OVERRIDE;
- virtual ByteArray getHMACSHA1(const SafeByteArray& key, const ByteArray& data) SWIFTEN_OVERRIDE;
- virtual ByteArray getHMACSHA1(const ByteArray& key, const ByteArray& data) SWIFTEN_OVERRIDE;
- virtual bool isMD5AllowedForCrypto() const SWIFTEN_OVERRIDE;
+ virtual Hash* createSHA1() override;
+ virtual Hash* createMD5() override;
+ virtual ByteArray getHMACSHA1(const SafeByteArray& key, const ByteArray& data) override;
+ virtual ByteArray getHMACSHA1(const ByteArray& key, const ByteArray& data) override;
+ virtual bool isMD5AllowedForCrypto() const override;
};
}
diff --git a/Swiften/Crypto/OpenSSLCryptoProvider.cpp b/Swiften/Crypto/OpenSSLCryptoProvider.cpp
index c785041..b46cb2a 100644
--- a/Swiften/Crypto/OpenSSLCryptoProvider.cpp
+++ b/Swiften/Crypto/OpenSSLCryptoProvider.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -31,15 +31,15 @@ namespace {
~SHA1Hash() {
}
- virtual Hash& update(const ByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const ByteArray& data) override {
return updateInternal(data);
}
- virtual Hash& update(const SafeByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const SafeByteArray& data) override {
return updateInternal(data);
}
- virtual std::vector<unsigned char> getHash() SWIFTEN_OVERRIDE {
+ virtual std::vector<unsigned char> getHash() override {
assert(!finalized);
std::vector<unsigned char> result(SHA_DIGEST_LENGTH);
SHA1_Final(vecptr(result), &context);
@@ -72,15 +72,15 @@ namespace {
~MD5Hash() {
}
- virtual Hash& update(const ByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const ByteArray& data) override {
return updateInternal(data);
}
- virtual Hash& update(const SafeByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const SafeByteArray& data) override {
return updateInternal(data);
}
- virtual std::vector<unsigned char> getHash() SWIFTEN_OVERRIDE {
+ virtual std::vector<unsigned char> getHash() override {
assert(!finalized);
std::vector<unsigned char> result(MD5_DIGEST_LENGTH);
MD5_Final(vecptr(result), &context);
diff --git a/Swiften/Crypto/OpenSSLCryptoProvider.h b/Swiften/Crypto/OpenSSLCryptoProvider.h
index 6e0c01b..e4ee97d 100644
--- a/Swiften/Crypto/OpenSSLCryptoProvider.h
+++ b/Swiften/Crypto/OpenSSLCryptoProvider.h
@@ -1,24 +1,23 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Crypto/CryptoProvider.h>
namespace Swift {
class OpenSSLCryptoProvider : public CryptoProvider {
public:
OpenSSLCryptoProvider();
- ~OpenSSLCryptoProvider();
+ virtual ~OpenSSLCryptoProvider() override;
- virtual Hash* createSHA1() SWIFTEN_OVERRIDE;
- virtual Hash* createMD5() SWIFTEN_OVERRIDE;
- virtual ByteArray getHMACSHA1(const SafeByteArray& key, const ByteArray& data) SWIFTEN_OVERRIDE;
- virtual ByteArray getHMACSHA1(const ByteArray& key, const ByteArray& data) SWIFTEN_OVERRIDE;
- virtual bool isMD5AllowedForCrypto() const SWIFTEN_OVERRIDE;
+ virtual Hash* createSHA1() override;
+ virtual Hash* createMD5() override;
+ virtual ByteArray getHMACSHA1(const SafeByteArray& key, const ByteArray& data) override;
+ virtual ByteArray getHMACSHA1(const ByteArray& key, const ByteArray& data) override;
+ virtual bool isMD5AllowedForCrypto() const override;
};
}
diff --git a/Swiften/Crypto/WindowsCryptoProvider.cpp b/Swiften/Crypto/WindowsCryptoProvider.cpp
index 513941f..c784283 100644
--- a/Swiften/Crypto/WindowsCryptoProvider.cpp
+++ b/Swiften/Crypto/WindowsCryptoProvider.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 Isode Limited.
+ * Copyright (c) 2012-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -43,11 +43,11 @@ namespace {
CryptDestroyHash(hash);
}
- virtual Hash& update(const ByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const ByteArray& data) override {
return updateInternal(data);
}
- virtual Hash& update(const SafeByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const SafeByteArray& data) override {
return updateInternal(data);
}
@@ -123,11 +123,11 @@ namespace {
CryptDestroyHash(hash);
}
- virtual Hash& update(const ByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const ByteArray& data) override {
return updateInternal(data);
}
- virtual Hash& update(const SafeByteArray& data) SWIFTEN_OVERRIDE {
+ virtual Hash& update(const SafeByteArray& data) override {
return updateInternal(data);
}
diff --git a/Swiften/Crypto/WindowsCryptoProvider.h b/Swiften/Crypto/WindowsCryptoProvider.h
index f446027..d0c982e 100644
--- a/Swiften/Crypto/WindowsCryptoProvider.h
+++ b/Swiften/Crypto/WindowsCryptoProvider.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -10,7 +10,6 @@
#include <boost/noncopyable.hpp>
-#include <Swiften/Base/Override.h>
#include <Swiften/Crypto/CryptoProvider.h>
namespace Swift {
@@ -19,11 +18,11 @@ namespace Swift {
WindowsCryptoProvider();
virtual ~WindowsCryptoProvider();
- virtual Hash* createSHA1() SWIFTEN_OVERRIDE;
- virtual Hash* createMD5() SWIFTEN_OVERRIDE;
- virtual ByteArray getHMACSHA1(const SafeByteArray& key, const ByteArray& data) SWIFTEN_OVERRIDE;
- virtual ByteArray getHMACSHA1(const ByteArray& key, const ByteArray& data) SWIFTEN_OVERRIDE;
- virtual bool isMD5AllowedForCrypto() const SWIFTEN_OVERRIDE;
+ virtual Hash* createSHA1() override;
+ virtual Hash* createMD5() override;
+ virtual ByteArray getHMACSHA1(const SafeByteArray& key, const ByteArray& data) override;
+ virtual ByteArray getHMACSHA1(const ByteArray& key, const ByteArray& data) override;
+ virtual bool isMD5AllowedForCrypto() const override;
private:
struct Private;