Browse Source

refactor(core): Remove unused Core::getKeyPair

pull/6637/head
Anthony Bilinski 3 years ago
parent
commit
d2fe222b89
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 19
      src/core/core.cpp
  2. 1
      src/core/core.h

19
src/core/core.cpp

@ -878,25 +878,6 @@ ToxPk Core::getSelfPublicKey() const @@ -878,25 +878,6 @@ ToxPk Core::getSelfPublicKey() const
return ToxPk(selfPk);
}
/**
* @brief Returns our public and private keys
*/
QPair<QByteArray, QByteArray> Core::getKeypair() const
{
QMutexLocker ml{&coreLoopLock};
QPair<QByteArray, QByteArray> keypair;
assert(tox != nullptr);
QByteArray pk(TOX_PUBLIC_KEY_SIZE, 0x00);
QByteArray sk(TOX_SECRET_KEY_SIZE, 0x00);
tox_self_get_public_key(tox.get(), reinterpret_cast<uint8_t*>(pk.data()));
tox_self_get_secret_key(tox.get(), reinterpret_cast<uint8_t*>(sk.data()));
keypair.first = pk;
keypair.second = sk;
return keypair;
}
QByteArray Core::getSelfDhtId() const
{
QMutexLocker ml{&coreLoopLock};

1
src/core/core.h

@ -109,7 +109,6 @@ public: @@ -109,7 +109,6 @@ public:
QString getStatusMessage() const;
ToxId getSelfId() const override;
ToxPk getSelfPublicKey() const override;
QPair<QByteArray, QByteArray> getKeypair() const;
QByteArray getSelfDhtId() const;
int getSelfUdpPort() const;

Loading…
Cancel
Save