Skip to content

Commit

Permalink
refactor(core): Remove unused Core::getKeyPair
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybilinski committed May 26, 2022
1 parent 50bda55 commit d2fe222
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
19 changes: 0 additions & 19 deletions src/core/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 0 additions & 1 deletion src/core/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ class Core : public QObject,
QString getStatusMessage() const;
ToxId getSelfId() const override;
ToxPk getSelfPublicKey() const override;
QPair<QByteArray, QByteArray> getKeypair() const;

QByteArray getSelfDhtId() const;
int getSelfUdpPort() const;
Expand Down

0 comments on commit d2fe222

Please sign in to comment.