-https://doc.libsodium.org/
To Do:
+-setup qbittorrent integration testing
+ -debug peer protocol/piece ambiguity
-design flow for grabbing pieces from cache/files
-where to store hashes (currently generated in torrent_file_piece_layers; not stored)
-IDEA: abstract out and store in struct torrent
-can easily load up blocks
-need easy access
-indexed
- -to what? - HERE
+ -to what?
+ -infohash -> pieces_root -> blocks (this is the index)
+ -to find i-th piece
+ -sort roots
+ -count pieces in each root
+ -go i, going to next file as necessary
+ -create struct with root, # of pieces, can easily sort
+ -need root hash in struct?
+ -extra space
+ -if i>pieces_count, i -= pieces_count, -> next struct
+ -then, piece_layers++, i--, blocks++++(as necessary based on ratio)
+ -then, load blocks
-pieces root (of each file)?
- -blocks?
- -need hashmap of all blocks?
- -otherwise, n^2 search
-piece layers?
-store pieces in hashmap? in struct torrent
-want quick access to file