mirror of
https://git.tesses.org/tesses50/tessesframework.git
synced 2026-08-02 00:25:31 +00:00
Fix license compliance and fix things up
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -15,26 +18,40 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../Serialization/Bencode.hpp"
|
||||
#include "TorrentStream.hpp"
|
||||
namespace Tesses::Framework::BitTorrent {
|
||||
/**
|
||||
* @brief Length of torrent pieces
|
||||
*
|
||||
*/
|
||||
constexpr int DEFAULT_PIECE_LENGTH = 524288;
|
||||
|
||||
/**
|
||||
* @brief The Torrent File Info Section
|
||||
*
|
||||
*/
|
||||
class TorrentFileInfo {
|
||||
|
||||
Serialization::Bencode::BeDictionary info;
|
||||
|
||||
public:
|
||||
/// @brief Constructs the object with empty data
|
||||
TorrentFileInfo();
|
||||
/// @brief Constructs the object with bencoded data
|
||||
/// @param tkn the bencoded dictionary
|
||||
TorrentFileInfo(const Serialization::Bencode::BeDictionary &tkn);
|
||||
|
||||
/// @brief The piece length
|
||||
int64_t piece_length = DEFAULT_PIECE_LENGTH;
|
||||
/// @brief The pieces
|
||||
Serialization::Bencode::BeString pieces;
|
||||
/// @brief Uses private trackers
|
||||
int64_t isPrivate = 0;
|
||||
/// @brief The torrent name
|
||||
Serialization::Bencode::BeString name;
|
||||
/// @brief The file list or length
|
||||
std::variant<int64_t, std::vector<TorrentFileEntry>> fileListOrLength;
|
||||
/// @brief Get the torrent file size
|
||||
int64_t GetTorrentFileSize();
|
||||
/// @brief Generate the info
|
||||
/// @return the dictionary containing the info
|
||||
@@ -68,23 +85,49 @@ class TorrentFileInfo {
|
||||
const Tesses::Framework::Filesystem::VFSPath &path,
|
||||
bool isPrivate = false, int64_t pieceLength = DEFAULT_PIECE_LENGTH);
|
||||
};
|
||||
/**
|
||||
* @brief The torrent file
|
||||
*
|
||||
*/
|
||||
class TorrentFile {
|
||||
public:
|
||||
/// @brief Construct the object with empty data
|
||||
TorrentFile();
|
||||
/// @brief Construct the object with bencoded data
|
||||
/// @param tkn the bencoded dictionary
|
||||
TorrentFile(const Serialization::Bencode::BeDictionary &tkn);
|
||||
|
||||
/// @brief The first tracker
|
||||
Serialization::Bencode::BeString announce;
|
||||
/// @brief The trackers
|
||||
std::vector<Serialization::Bencode::BeString> announce_list;
|
||||
/// @brief The webseed urls
|
||||
std::vector<Serialization::Bencode::BeString> url_list;
|
||||
/// @brief The comment
|
||||
Serialization::Bencode::BeString comment;
|
||||
/// @brief The creator
|
||||
Serialization::Bencode::BeString created_by;
|
||||
/// @brief When it was created
|
||||
int64_t creation_date = 0;
|
||||
/// @brief The info
|
||||
TorrentFileInfo info;
|
||||
|
||||
/// @brief Convert to dictionary
|
||||
Serialization::Bencode::BeDictionary ToDictionary();
|
||||
|
||||
/// @brief Print the info
|
||||
/// @param writer the text writer
|
||||
void Print(std::shared_ptr<TextStreams::TextWriter> writer);
|
||||
|
||||
/// @brief Create a torrent
|
||||
/// @param torrent_file_stream the bencoded file stream to write to
|
||||
/// @param trackers the trackers you want
|
||||
/// @param webseeds the webseeds you want
|
||||
/// @param vfs the vfs you want to populate from
|
||||
/// @param path the path you want the root to be or the file
|
||||
/// @param isPrivate is for private trackers
|
||||
/// @param pieceLength the size of the pieces
|
||||
/// @param comment a comment, anything really
|
||||
/// @param created_by the tool who created it, I would keep it
|
||||
/// TessesFrameworkTorrent if I were you
|
||||
static void CreateTorrent(
|
||||
std::shared_ptr<Tesses::Framework::Streams::Stream> torrent_file_stream,
|
||||
const std::vector<Serialization::Bencode::BeString> &trackers,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -21,48 +24,108 @@
|
||||
#include "TessesFramework/Http/HttpClient.hpp"
|
||||
#include "TessesFramework/Streams/NetworkStream.hpp"
|
||||
namespace Tesses::Framework::BitTorrent {
|
||||
/// @brief The file entry in the torrent
|
||||
class TorrentFileEntry {
|
||||
public:
|
||||
/// @brief Construct the object with empty values
|
||||
TorrentFileEntry();
|
||||
/// @brief Construct the object with a path and a length
|
||||
/// @param path the path in the torrent
|
||||
/// @param length the length of the file in bytes
|
||||
TorrentFileEntry(Tesses::Framework::Filesystem::VFSPath path,
|
||||
int64_t length);
|
||||
/// @brief The path in the torrent
|
||||
Tesses::Framework::Filesystem::VFSPath path;
|
||||
/// @brief The length of the file in bytes
|
||||
int64_t length = 0;
|
||||
};
|
||||
/// @brief an abstract stream with explicit offset
|
||||
class ReadWriteAt {
|
||||
public:
|
||||
/// @brief Read a block at offset
|
||||
/// @param offset the offset in the stream
|
||||
/// @param data the pointer to a buffer
|
||||
/// @param len the length of the buffer
|
||||
/// @return Did it succeed
|
||||
virtual bool ReadBlockAt(uint64_t offset, uint8_t *data, size_t len) = 0;
|
||||
/// @brief Write a block at offset
|
||||
/// @param offset the offset in the stream
|
||||
/// @param data the pointer to a buffer
|
||||
/// @param len the length of the buffer
|
||||
virtual void WriteBlockAt(uint64_t offset, const uint8_t *data,
|
||||
size_t len) = 0;
|
||||
virtual ~ReadWriteAt();
|
||||
};
|
||||
|
||||
/// @brief A concrette stream for the file
|
||||
class TorrentFileStream : public ReadWriteAt {
|
||||
Tesses::Framework::Threading::Mutex mtx;
|
||||
|
||||
public:
|
||||
/// @brief The vfs
|
||||
std::shared_ptr<Tesses::Framework::Filesystem::VFS> vfs;
|
||||
/// @brief The path
|
||||
Tesses::Framework::Filesystem::VFSPath path;
|
||||
/// @brief the length
|
||||
uint64_t length;
|
||||
/**
|
||||
* @brief Construct a new Torrent File Stream object
|
||||
*
|
||||
* @param vfs the filesystem
|
||||
* @param path the file (not the bencoded torrent file)
|
||||
* @param length the file length (according to the bencoded torrent file)
|
||||
*/
|
||||
TorrentFileStream(std::shared_ptr<Tesses::Framework::Filesystem::VFS> vfs,
|
||||
Tesses::Framework::Filesystem::VFSPath path,
|
||||
uint64_t length);
|
||||
/// @brief Read a block at offset
|
||||
/// @param offset the offset in the stream
|
||||
/// @param data the pointer to a buffer
|
||||
/// @param len the length of the buffer
|
||||
/// @return Did it succeed
|
||||
bool ReadBlockAt(uint64_t offset, uint8_t *data, size_t len);
|
||||
/// @brief Write a block at offset
|
||||
/// @param offset the offset in the stream
|
||||
/// @param data the pointer to a buffer
|
||||
/// @param len the length of the buffer
|
||||
void WriteBlockAt(uint64_t offset, const uint8_t *data, size_t len);
|
||||
};
|
||||
/**
|
||||
* @brief A concrette stream for a torrent with multiple files
|
||||
*
|
||||
*/
|
||||
class TorrentDirectoryStream : public ReadWriteAt {
|
||||
|
||||
std::vector<Tesses::Framework::Threading::Mutex> mtxs;
|
||||
|
||||
public:
|
||||
/// @brief The filesystem
|
||||
std::shared_ptr<Tesses::Framework::Filesystem::VFS> vfs;
|
||||
/// @brief The root directory
|
||||
Tesses::Framework::Filesystem::VFSPath path;
|
||||
/// @brief The files
|
||||
std::vector<TorrentFileEntry> entries;
|
||||
/**
|
||||
* @brief Construct a new Torrent Directory Stream object
|
||||
*
|
||||
* @param vfs the filesystem
|
||||
* @param path the root directory
|
||||
* @param entries the files
|
||||
*/
|
||||
TorrentDirectoryStream(
|
||||
std::shared_ptr<Tesses::Framework::Filesystem::VFS> vfs,
|
||||
Tesses::Framework::Filesystem::VFSPath path,
|
||||
std::vector<TorrentFileEntry> entries);
|
||||
|
||||
/// @brief Read a block at offset
|
||||
/// @param offset the offset in the stream
|
||||
/// @param data the pointer to a buffer
|
||||
/// @param len the length of the buffer
|
||||
/// @return Did it succeed
|
||||
bool ReadBlockAt(uint64_t offset, uint8_t *data, size_t len);
|
||||
/// @brief Write a block at offset
|
||||
/// @param offset the offset in the stream
|
||||
/// @param data the pointer to a buffer
|
||||
/// @param len the length of the buffer
|
||||
void WriteBlockAt(uint64_t offset, const uint8_t *data, size_t len);
|
||||
};
|
||||
} // namespace Tesses::Framework::BitTorrent
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -20,22 +23,78 @@
|
||||
#include "../Streams/Stream.hpp"
|
||||
|
||||
namespace Tesses::Framework::Crypto {
|
||||
/**
|
||||
* @brief This stream is to encrypt data for TLS (client side)
|
||||
*
|
||||
*/
|
||||
class ClientTLSStream : public Tesses::Framework::Streams::Stream {
|
||||
void *privateData;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Get the Cert Chain object
|
||||
*
|
||||
* @return std::string The cert chain
|
||||
*/
|
||||
static std::string GetCertChain();
|
||||
|
||||
/**
|
||||
* @brief Construct a new Client TLS Stream object
|
||||
*
|
||||
* @param innerStream the underlying encrypted in transit stream
|
||||
* @param verify do we verify the certificate
|
||||
* @param domain the domain name
|
||||
*/
|
||||
ClientTLSStream(
|
||||
std::shared_ptr<Tesses::Framework::Streams::Stream> innerStream,
|
||||
bool verify, std::string domain);
|
||||
/**
|
||||
* @brief Construct a new Client TLS Stream object with an alternative
|
||||
* certificate chain (for server with self signed certificates)
|
||||
*
|
||||
* @param innerStream the underlying encrypted in transit stream
|
||||
* @param verify do we verify the certificate
|
||||
* @param domain the domain name
|
||||
* @param cert the actual certificate
|
||||
*/
|
||||
ClientTLSStream(
|
||||
std::shared_ptr<Tesses::Framework::Streams::Stream> innerStream,
|
||||
bool verify, std::string domain, std::string cert);
|
||||
/**
|
||||
* @brief Read from the stream
|
||||
*
|
||||
* @param buff the buffer
|
||||
* @param sz the size of the buffer
|
||||
* @return size_t the bytes read
|
||||
*/
|
||||
size_t Read(uint8_t *buff, size_t sz);
|
||||
/**
|
||||
* @brief Write to the stream
|
||||
*
|
||||
* @param buff the buffer
|
||||
* @param sz the size of the buffer
|
||||
* @return size_t the bytes writen
|
||||
*/
|
||||
size_t Write(const uint8_t *buff, size_t sz);
|
||||
/**
|
||||
* @brief Can I read from the stream
|
||||
*
|
||||
* @return true Yes I can
|
||||
* @return false No I can't
|
||||
*/
|
||||
bool CanRead();
|
||||
/**
|
||||
* @brief Can I write to the stream
|
||||
*
|
||||
* @return true Yes I can
|
||||
* @return false No I can't
|
||||
*/
|
||||
bool CanWrite();
|
||||
/**
|
||||
* @brief Is it the end of the stream
|
||||
*
|
||||
* @return true yes
|
||||
* @return false no
|
||||
*/
|
||||
bool EndOfStream();
|
||||
~ClientTLSStream();
|
||||
};
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,67 +22,298 @@
|
||||
#pragma once
|
||||
#include "../Streams/Stream.hpp"
|
||||
namespace Tesses::Framework::Crypto {
|
||||
/**
|
||||
* @brief Do I have crypto
|
||||
*
|
||||
* @return true yes I do
|
||||
* @return false no I don't
|
||||
*/
|
||||
bool HaveCrypto();
|
||||
/**
|
||||
* @brief Encode bytes into a base64 string
|
||||
*
|
||||
* @param data the bytes
|
||||
* @return std::string base64 encoded text
|
||||
*/
|
||||
std::string Base64_Encode(std::vector<uint8_t> data);
|
||||
/**
|
||||
* @brief Decode bytes from a base64 string
|
||||
*
|
||||
* @param str base64 encoded text
|
||||
* @return std::vector<uint8_t> the bytes
|
||||
*/
|
||||
std::vector<uint8_t> Base64_Decode(std::string str);
|
||||
/**
|
||||
* @brief Hash using SHA1 (don't use unless protocol needs it like websocket's
|
||||
* handshake, https://marc-stevens.nl/research/shattered.io/)
|
||||
*
|
||||
*/
|
||||
class Sha1 {
|
||||
void *inner;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Sha 1 object
|
||||
*
|
||||
*/
|
||||
Sha1();
|
||||
/**
|
||||
* @brief Start it up
|
||||
*
|
||||
* @return true you can use it
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Start();
|
||||
/**
|
||||
* @brief Update the hash, by writing more bytes
|
||||
*
|
||||
* @param buffer the buffer
|
||||
* @param sz the size of the buffer
|
||||
* @return true you are ok
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Update(const uint8_t *buffer, size_t sz);
|
||||
/**
|
||||
* @brief Update the hash, by using a stream, but I would say use the static
|
||||
* ComputeHash then
|
||||
*
|
||||
* @param strm the stream
|
||||
* @return true you are ok
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Update(std::shared_ptr<Tesses::Framework::Streams::Stream> strm);
|
||||
/**
|
||||
* @brief Finish the hashing process
|
||||
*
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
std::vector<uint8_t> Finish();
|
||||
~Sha1();
|
||||
/**
|
||||
* @brief Convience function to hash an entire buffer
|
||||
*
|
||||
* @param buffer the buffer
|
||||
* @param len the size of the buffer
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
static std::vector<uint8_t> ComputeHash(const uint8_t *buffer, size_t len);
|
||||
/**
|
||||
* @brief Convience function to hash a stream
|
||||
*
|
||||
* @param strm the stream
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
static std::vector<uint8_t>
|
||||
ComputeHash(std::shared_ptr<Tesses::Framework::Streams::Stream> strm);
|
||||
};
|
||||
/**
|
||||
* @brief Hash using SHA256 or SHA224
|
||||
*
|
||||
*/
|
||||
class Sha256 {
|
||||
void *inner;
|
||||
bool is224;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Sha 256 object
|
||||
*
|
||||
*/
|
||||
Sha256();
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param is224 if true, use SHA224 (which is resiliant to length extension
|
||||
* attacks) instead of SHA256 (which is not)
|
||||
* @return true you can use it
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Start(bool is224 = false);
|
||||
/**
|
||||
* @brief Do we use SHA224
|
||||
*
|
||||
* @return true we use SHA224
|
||||
* @return false we use SHA256
|
||||
*/
|
||||
bool Is224();
|
||||
/**
|
||||
* @brief Update the hash, by writing more bytes
|
||||
*
|
||||
* @param buffer the buffer
|
||||
* @param sz the size of the buffer
|
||||
* @return true you are ok
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Update(const uint8_t *buffer, size_t sz);
|
||||
/**
|
||||
* @brief Update the hash, by using a stream, but I would say use the static
|
||||
* ComputeHash then
|
||||
*
|
||||
* @param strm the stream
|
||||
* @return true you are ok
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Update(std::shared_ptr<Tesses::Framework::Streams::Stream> strm);
|
||||
/**
|
||||
* @brief Finish the hashing process
|
||||
*
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
std::vector<uint8_t> Finish();
|
||||
/**
|
||||
* @brief Destroy the Sha 256 object
|
||||
*
|
||||
*/
|
||||
~Sha256();
|
||||
/**
|
||||
* @brief Convience function to hash an entire buffer
|
||||
*
|
||||
* @param buffer the buffer
|
||||
* @param len the size of the buffer
|
||||
* @param is224 if true, use SHA224 (which is resiliant to length extension
|
||||
* attacks) instead of SHA256 (which is not)
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
static std::vector<uint8_t> ComputeHash(const uint8_t *buffer, size_t len,
|
||||
bool is224 = false);
|
||||
/**
|
||||
* @brief Convience function to hash a stream
|
||||
*
|
||||
* @param strm the stream
|
||||
* @param is224 if true, use SHA224 (which is resiliant to length extension
|
||||
* attacks) instead of SHA256 (which is not)
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
static std::vector<uint8_t>
|
||||
ComputeHash(std::shared_ptr<Tesses::Framework::Streams::Stream> strm,
|
||||
bool is224 = false);
|
||||
};
|
||||
/**
|
||||
* @brief Hash using SHA512 or SHA384
|
||||
*
|
||||
*/
|
||||
class Sha512 {
|
||||
void *inner;
|
||||
bool is384;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Sha 512 object
|
||||
*
|
||||
*/
|
||||
Sha512();
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param is384 if true, use SHA384 (which is resiliant to length extension
|
||||
* attacks) instead of SHA512 (which is not)
|
||||
* @return true you can use it
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Start(bool is384 = false);
|
||||
/**
|
||||
* @brief Do we use SHA384
|
||||
*
|
||||
* @return true we use SHA384
|
||||
* @return false we use SHA512
|
||||
*/
|
||||
bool Is384();
|
||||
/**
|
||||
* @brief Update the hash, by writing more bytes
|
||||
*
|
||||
* @param buffer the buffer
|
||||
* @param sz the size of the buffer
|
||||
* @return true you are ok
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Update(const uint8_t *buffer, size_t sz);
|
||||
/**
|
||||
* @brief Update the hash, by using a stream, but I would say use the static
|
||||
* ComputeHash then
|
||||
*
|
||||
* @param strm the stream
|
||||
* @return true you are ok
|
||||
* @return false there was an error
|
||||
*/
|
||||
bool Update(std::shared_ptr<Tesses::Framework::Streams::Stream> strm);
|
||||
/**
|
||||
* @brief Finish the hashing process
|
||||
*
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
std::vector<uint8_t> Finish();
|
||||
/**
|
||||
* @brief Destroy the Sha 512 object
|
||||
*
|
||||
*/
|
||||
~Sha512();
|
||||
|
||||
/**
|
||||
* @brief Convience function to hash an entire buffer
|
||||
*
|
||||
* @param buffer the buffer
|
||||
* @param len the size of the buffer
|
||||
* @param is384 if true, use SHA384 (which is resiliant to length extension
|
||||
* attacks) instead of SHA512 (which is not)
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
static std::vector<uint8_t> ComputeHash(const uint8_t *buffer, size_t len,
|
||||
bool is384 = false);
|
||||
/**
|
||||
* @brief Convience function to hash a stream
|
||||
*
|
||||
* @param strm the stream
|
||||
* @param is384 if true, use SHA384 (which is resiliant to length extension
|
||||
* attacks) instead of SHA512 (which is not)
|
||||
* @return std::vector<uint8_t> the hash bytes (binary, not text)
|
||||
*/
|
||||
static std::vector<uint8_t>
|
||||
ComputeHash(std::shared_ptr<Tesses::Framework::Streams::Stream> strm,
|
||||
bool is384 = false);
|
||||
};
|
||||
/**
|
||||
* @brief The sha version struct for PBKDF2 and friends
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
/**
|
||||
* @brief Use sha1, please don't
|
||||
* (https://marc-stevens.nl/research/shattered.io/) (I don't even know why I
|
||||
* have this here)
|
||||
*
|
||||
*/
|
||||
VERSION_SHA1 = 1,
|
||||
/**
|
||||
* @brief Use SHA224
|
||||
*
|
||||
*/
|
||||
VERSION_SHA224 = 224,
|
||||
/**
|
||||
* @brief Use SHA256 (vulnerable to length extension attacks)
|
||||
*
|
||||
*/
|
||||
VERSION_SHA256 = 256,
|
||||
/**
|
||||
* @brief Use SHA384
|
||||
*
|
||||
*/
|
||||
VERSION_SHA384 = 384,
|
||||
/**
|
||||
* @brief Use SHA512 (vulnerable to length extension attacks)
|
||||
*
|
||||
*/
|
||||
VERSION_SHA512 = 512
|
||||
} ShaVersion;
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param output the output, which is safe for being in your database
|
||||
* @param pass the password
|
||||
* @param salt the salt (what is safe to be in your db)
|
||||
* @param itterations how many itterations
|
||||
* @param version the sha version
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
bool PBKDF2(std::vector<uint8_t> &output, std::string pass,
|
||||
std::vector<uint8_t> &salt, long itterations, ShaVersion version);
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -22,6 +25,7 @@
|
||||
#include <string>
|
||||
|
||||
namespace Tesses::Framework::Date {
|
||||
|
||||
int GetTimeZone();
|
||||
bool TimeZoneSupportDST();
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -17,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VFS.hpp"
|
||||
#include "VFSFix.hpp"
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -25,4 +28,6 @@
|
||||
Just in case
|
||||
*/
|
||||
#undef Lock
|
||||
#undef Unlock
|
||||
#undef Unlock
|
||||
#undef min
|
||||
#undef max
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -63,6 +66,7 @@ class ServerContext {
|
||||
HttpDictionary requestHeaders;
|
||||
HttpDictionary responseHeaders;
|
||||
HttpDictionary queryParams;
|
||||
HttpDictionary bodyParams;
|
||||
// used by path
|
||||
HttpDictionary pathArguments;
|
||||
std::string path;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -97,10 +100,9 @@ struct CaseInsensitiveLess {
|
||||
|
||||
class HttpDictionary {
|
||||
public:
|
||||
HttpDictionary();
|
||||
HttpDictionary(bool caseSensitive);
|
||||
explicit HttpDictionary(bool caseSensitive);
|
||||
std::map<std::string, std::vector<std::string>, CaseInsensitiveLess> kvp;
|
||||
void SetCaseSensitive(bool isCaseSensitive);
|
||||
|
||||
void Clear();
|
||||
void Clear(std::string key, bool kvpExistsAfter);
|
||||
void SetValue(std::string key, std::string value);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -50,7 +53,7 @@ class RouteServer : public IHttpServer {
|
||||
|
||||
void Delete(std::string pattern, ServerRequestHandler handler);
|
||||
|
||||
void Trace(std::string pattern, ServerRequestHandler handler);
|
||||
void Query(std::string pattern, ServerRequestHandler handler);
|
||||
void Options(std::string pattern, ServerRequestHandler handler);
|
||||
void Add(std::string method, std::string pattern,
|
||||
ServerRequestHandler handler);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,6 +22,7 @@
|
||||
#pragma once
|
||||
#include "Args.hpp"
|
||||
#include "BitTorrent/TorrentFile.hpp"
|
||||
#include "Console.hpp"
|
||||
#include "Crypto/ClientTLSStream.hpp"
|
||||
#include "Crypto/Crypto.hpp"
|
||||
#include "Date/Date.hpp"
|
||||
@@ -64,5 +68,4 @@
|
||||
#include "TextStreams/StringWriter.hpp"
|
||||
#include "Threading/Mutex.hpp"
|
||||
#include "Threading/Thread.hpp"
|
||||
#include "Threading/ThreadPool.hpp"
|
||||
#include "Console.hpp"
|
||||
#include "Threading/ThreadPool.hpp"
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -27,6 +30,4 @@ class ConsoleReader : public TextReader {
|
||||
|
||||
ConsoleReader StdIn();
|
||||
|
||||
|
||||
|
||||
} // namespace Tesses::Framework::TextStreams
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -17,18 +20,9 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <functional>
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#undef min
|
||||
#elif defined(GEKKO)
|
||||
#include <ogc/lwp.h>
|
||||
#elif defined(__SWITCH__)
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#include "../HiddenField.hpp"
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
namespace Tesses::Framework::Threading {
|
||||
class Thread {
|
||||
HiddenField data;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
TessesFramework a library to make C++ easier for me, used in CrossLang:
|
||||
https://git.tesses.org/tesses50/crosslang Copyright (C) 2026 Mike Nolan
|
||||
https://git.tesses.org/tesses50/crosslang
|
||||
|
||||
Copyright (C) 2026 Mike Nolan
|
||||
SPDX-License-Identifier: GPL-3.0-or-later WITH TessesFramework-Exception-1.0
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
Reference in New Issue
Block a user