mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix compile errors with AuthenticatedEncryption as Poco::AutoPtr
This commit is contained in:
parent
b8e93e8142
commit
39e85a959e
@ -4,6 +4,9 @@
|
||||
|
||||
#include "../SingletonManager/MemoryManager.h"
|
||||
#include "../lib/AutoPtrContainer.h"
|
||||
|
||||
#include "Poco/AutoPtr.h"
|
||||
|
||||
#include <shared_mutex>
|
||||
#include <vector>
|
||||
|
||||
@ -45,6 +48,9 @@ public:
|
||||
|
||||
inline KeyHashed getKeyHashed() const { std::shared_lock<std::shared_mutex> _lock(mWorkingMutex); return mEncryptionKeyHash; }
|
||||
inline bool operator == (const Poco::AutoPtr<AuthenticatedEncryption>& b) const {
|
||||
return isTheSame(b);
|
||||
}
|
||||
inline bool isTheSame(const Poco::AutoPtr<AuthenticatedEncryption>& b) const {
|
||||
std::shared_lock<std::shared_mutex> _lock(mWorkingMutex);
|
||||
if (b.isNull()) return false;
|
||||
return mEncryptionKeyHash == b->getKeyHashed();
|
||||
|
||||
@ -352,10 +352,9 @@ const Mnemonic* Passphrase::detectMnemonic(const std::string& passphrase, const
|
||||
}
|
||||
if (existAll) {
|
||||
if (keyPair) {
|
||||
auto test_passphrase = new Passphrase(passphrase, &m);
|
||||
Poco::AutoPtr<Passphrase> test_passphrase = new Passphrase(passphrase, &m);
|
||||
test_passphrase->createWordIndices();
|
||||
auto key_pair = KeyPairEd25519::create(test_passphrase);
|
||||
delete test_passphrase;
|
||||
if (key_pair) {
|
||||
if (*key_pair != *keyPair) {
|
||||
delete key_pair;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user