File indexing completed on 2025-01-05 04:37:19

0001 /*
0002     SPDX-FileCopyrightText: 2005 Joris Guisson <joris.guisson@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #ifndef MSEFUNCTIONS_H
0007 #define MSEFUNCTIONS_H
0008 
0009 #include <QString>
0010 
0011 namespace bt
0012 {
0013 class SHA1Hash;
0014 }
0015 
0016 namespace mse
0017 {
0018 class BigInt;
0019 
0020 void GeneratePublicPrivateKey(BigInt &pub, BigInt &priv);
0021 BigInt DHSecret(const BigInt &our_priv, const BigInt &peer_pub);
0022 bt::SHA1Hash EncryptionKey(bool a, const BigInt &s, const bt::SHA1Hash &skey);
0023 
0024 void DumpBigInt(const QString &name, const BigInt &bi);
0025 }
0026 
0027 #endif