summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-07-13 06:07:37 (GMT)
committerTobias Markmann <tm@ayena.de>2017-07-13 06:07:37 (GMT)
commit497dfb8ab128b0bbfdb6b3045caa03f8b38bc9fc (patch)
tree4d69e5ce56c755cf3b61aaf78e24729130f77e2e /Swiften/Crypto
parent8f4d198c4d3aa55a5215061e84572d5faf4e4117 (diff)
downloadswift-497dfb8ab128b0bbfdb6b3045caa03f8b38bc9fc.zip
swift-497dfb8ab128b0bbfdb6b3045caa03f8b38bc9fc.tar.bz2
Remove Swiften/Base/Override.h
Replaced SWIFTEN_OVERRIDE with C++11 standard override keyword. Test-Information: Tested on macOS 10.12.5 with clang trunk. Change-Id: If89c6cc2a648662522a320834c314496c943a55a
Diffstat (limited to 'Swiften/Crypto')
-rw-r--r--Swiften/Crypto/CommonCryptoCryptoProvider.cpp16
-rw-r--r--Swiften/Crypto/CommonCryptoCryptoProvider.h13
-rw-r--r--Swiften/Crypto/OpenSSLCryptoProvider.cpp14
-rw-r--r--Swiften/Crypto/OpenSSLCryptoProvider.h13
-rw-r--r--Swiften/Crypto/WindowsCryptoProvider.cpp10
-rw-r--r--Swiften/Crypto/WindowsCryptoProvider.h13
6 files changed, 38 insertions, 41 deletions
diff --git a/Swiften/Crypto/CommonCryptoCryptoProvider.cpp b/Swiften/Crypto/CommonCryptoCryptoProvider.cpp
index 63dfc4c..d4257e0 100644
--- a/Swiften/Crypto/CommonCryptoCryptoProvider.cpp
+++ b/Swiften/Crypto/CommonCryptoCryptoProvider.cpp
@@ -27,18 +27,18 @@ namespace {
}
}
- virtual ~SHA1Hash() SWIFTEN_OVERRIDE {
+ 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 {
}
}
- virtual ~MD5Hash() SWIFTEN_OVERRIDE {
+ 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 302410d..7d1675f 100644
--- a/Swiften/Crypto/CommonCryptoCryptoProvider.h
+++ b/Swiften/Crypto/CommonCryptoCryptoProvider.h
@@ -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();
- virtual ~CommonCryptoCryptoProvider() SWIFTEN_OVERRIDE;
+ 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 24d7bd8..e4ee97d 100644
--- a/Swiften/Crypto/OpenSSLCryptoProvider.h
+++ b/Swiften/Crypto/OpenSSLCryptoProvider.h
@@ -6,19 +6,18 @@
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Crypto/CryptoProvider.h>
namespace Swift {
class OpenSSLCryptoProvider : public CryptoProvider {
public:
OpenSSLCryptoProvider();
- virtual ~OpenSSLCryptoProvider() SWIFTEN_OVERRIDE;
+ 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;