-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to the onion API and node handling, as well as a new `pi_t_fu…
…nctions` package with symmetric AES key generation and encryption. Description: This commit updates the onion API and node handling to fix several issues. In the `internal/api/onionApi.go` file, the `QueueOnion` and `Receive` functions have been modified to correctly handle onions and messages. In `node.go`, the `startRun` function has been fixed to correctly handle active nodes and message queuing. Additionally, the `pi_t` package has been broken out into its own module, `pi_t`, and relocated to the `pkg` directory. This change allows the `pi_t` package to be easily reused in other projects. The package includes a new function, `GenerateSymmetricKey`, which generates a random 256-bit AES key for encryption. The `EncryptWithAES` and `DecryptWithAES` functions have been added to the `pi_t` package to encrypt and decrypt data using the generated AES key. The commit also updates the `internal/node/node_handler.go` file to correctly handle onions and messages using the new `pi_t` package. The `HandleReceive` and `HandleClientRequest` functions have been modified to use the new `pi_t` functions to encrypt and decrypt onions. undefined
- Loading branch information
1 parent
5c4da3f
commit 190c31e
Showing
5 changed files
with
179 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package api | ||
|
||
type OnionApi struct { | ||
Onion string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.