tt2468 ee751edf54 SettingsDialog: Mild refactor and add Connect Info dialog
Among lots of stuff:

- Generate a random password on first load

- Add `ConnectInfo` dialog including QR code display

- Add `Generate Password` button to generate a new random
password

- Delete `Copy Password to Clipboard` button

- Delete `GetConnectString` or whatever from WebSocketServer
(reimplemented the functionality directly into ConnectInfo)

- Added `GeneratePassword()` to Utils

Todo: Show warning when users specify their own passwords
2021-05-08 04:29:03 -07:00

33 lines
732 B
C++

#pragma once
#include <string>
#include <QString>
#include <nlohmann/json.hpp>
#include <obs-data.h>
using json = nlohmann::json;
namespace Utils {
namespace Json {
bool JsonArrayIsValidObsArray(json j);
obs_data_t *JsonToObsData(json j);
json ObsDataToJson(obs_data_t *d, bool includeDefault = false);
}
namespace Crypto {
std::string GenerateSalt();
std::string GenerateSecret(std::string password, std::string salt);
bool CheckAuthenticationString(std::string secret, std::string challenge, std::string authenticationString);
QString GeneratePassword(size_t length = 16);
}
namespace Platform {
std::string GetLocalAddress();
QString GetCommandLineArgument(QString arg);
}
namespace Obs {
;
}
}