Commit Graph

18 Commits

Author SHA1 Message Date
Charles Kerr df1cca9b57
chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Charles Kerr b0ee4007ff
refactor: include cleanups (#2392)
* refactor: include <memory> when using shared_ptr or unique_ptr

* refactor: include <cstdio> iff we use it

* refactor: include <cstring> iff we use it

* refactor: include <cstdlib> iff we use it

* refactor: include <string_view> or <string> iff we use it

* refactor: include <array> iff we use it

* refactor: include <ctime> iff we use it

* refactor: include <cctype> iff we use it

* refactor: misc #include cleanups in libtransmission
2022-01-12 20:13:58 -06:00
Charles Kerr 0c16c454ba
refactor: base64 utils (#2381)
base64 encode/decode now take std::string_views and return std::strings
2022-01-08 06:46:25 -06:00
Charles Kerr 02aa2f46d4
refactor: don't use varargs in tr_error (#2352) 2021-12-27 20:32:22 -06:00
Charles Kerr bd68d3a2fd
refactor: use tr_sha1_digest_t everywhere (#2330) 2021-12-21 16:14:15 -06:00
Charles Kerr 37a8046ed5
fix: more sonarcloud warnings (#2324) 2021-12-16 23:47:51 -06:00
Charles Kerr 42b1362760
refactor: tidy libtransmission includes (#2316) 2021-12-15 15:25:42 -06:00
Charles Kerr af8e9e66b9
fixup! refactor: rpc-server.cc (#2152) (#2164)
fixup: rpc-server auth regression; fix tests
2021-11-14 21:54:48 -06:00
Charles Kerr 99aeaa0eaf
refactor: tr_ssha1(), tr_ssha1_matches() (#2148)
* refactor: make tr_ssha1 and tr_ssha1_matches string_view-friendly
2021-11-13 20:03:01 -06:00
Dzmitry Neviadomski 319e1fc6bb
Replace C rand() with uniform_int_distribution and mt19937. (#2089)
Reuse random engine and distribution itself and change only
distribution bounds via lightweight param type.
2021-11-11 13:03:33 -06:00
Charles Kerr bdf1bb6d17
refactor: tr_strv*() util functions (#2123)
* feat: add tr_strv utils
2021-11-09 18:13:47 -06:00
Charles Kerr 2b65b985cf
refactor: cppcoreguidelines-init-variables pt. 14 (#2049)
* refactor: fix uninit var warnings in ptrarray

* refactor: fix uninit var warnings in bitfield

* refactor: fix uninit var warnings in handshake

* refactor: fix uninit var warnings in tr-dht

* refactor: fix uninit var warnings in natpmp

* refactor: fix uninit var warnings in tr-dht

* refactor: fix uninit var warnings in crypto-utils-openssl

* refactor: fix uninit var warnings in handshake

* refactor: fix uninit var warnings in crypto-utils

* refactor: fix uninit var warnings in crypto

* Revert "refactor: fix uninit var warnings in handshake"

This reverts commit 5aaa9cc30a.

* refactor: fix uninit var warnings in crypto-utils-ccrypto

* refactor: fix uninit var warnings in crypto-utils-polarssl

* refactor: fix uninit var warnings in crypto-utils-cyassl

* fixup! refactor: fix uninit var warnings in crypto-utils-cyassl

* fixup! refactor: cppcoreguidelines-init-variables pt. 13 (#2043)
2021-10-26 19:16:56 -05:00
Charles Kerr 850b3caa61
refactor: prefer constexpr over enum for non enumerated constants (#1996)
refactor: prefer constexpr over enum for non-enumerated constants
2021-10-20 19:39:05 -05:00
Charles Kerr 16e9a99fe9
refactor: clang-tidy --fix modernize-deprecated-headers (#1980) 2021-10-17 15:17:18 -05:00
Charles Kerr fd5804fbb7
refactor: add readability-else-after-return to clang-tidy (#1956)
* refactor: add readability-else-after-return to clang-tidy
2021-10-14 14:26:38 -05:00
Charles Kerr ab82e155be
build: add clang tidy modernize loop convert (#1949)
* build: add clang-tidy check modernize-pass-by-value

* build: add clang-tidy check modernize-loop-convert

* refactor: constexpr

* refactor: make preallocGuess a std::array
2021-10-14 10:36:49 -05:00
Dmytro Lytovchenko 43d1ece562
C++ modernization: Replace NULLs with typesafe nullptrs (#1799)
Fixing CI errors and build errors
Reverted changes: NULL in EV_SET macro; Clang-formatting
Reverted changes: MacosX *.m files reverted from master
2021-09-14 19:18:09 -05:00
Charles Kerr 4c1b627647
refactor: port libtransmission to C++ (#1787)
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization 
patches!

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00
Renamed from libtransmission/crypto-utils.c (Browse further)