Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashy5000 committed Apr 1, 2024
2 parents eb9f0e6 + b3180d7 commit bb27e27
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The root directory of this project is occupied by the Golang source code that no

## Setup & Usage

For a simpler guide, see the [welcome](docs/welcome.md) page.

*Note: A node must have a publicly accessible IP address in order to join the network. You may have to set up port forwarding on your router.*

Create and clone the repository:
Expand Down
28 changes: 28 additions & 0 deletions encryption_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package main

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestEncryptKey(t *testing.T) {
t.Run("It encrypts the key.json file", func(t *testing.T) {
// Act
EncryptKey("0123456789abcdef")
// Assert
assert.True(t, IsKeyEncrypted())
DecryptKey("0123456789abcdef")
})
}

func TestDecryptKey(t *testing.T) {
t.Run("It decrypts the key.json file", func(t *testing.T) {
// Arrange
EncryptKey("0123456789abcdef")
// Act
DecryptKey("0123456789abcdef")
// Assert
assert.False(t, IsKeyEncrypted())
})
}

0 comments on commit bb27e27

Please sign in to comment.