mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
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
33 lines
732 B
C++
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 {
|
|
;
|
|
}
|
|
}
|