Initial commit
This commit is contained in:
commit
137cb2ce13
215 changed files with 659023 additions and 0 deletions
18
tests/GameCult.Networking.Tests/NetworkingTests.cs
Normal file
18
tests/GameCult.Networking.Tests/NetworkingTests.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace GameCult.Networking.Tests
|
||||
{
|
||||
public class NetworkingTests
|
||||
{
|
||||
[Test]
|
||||
public void EncryptDecrypt_Roundtrip()
|
||||
{
|
||||
var plaintext = Encoding.UTF8.GetBytes("test");
|
||||
var nonce = Secret.NewNonce;
|
||||
var encrypted = Secret.EncryptBytes(plaintext, nonce);
|
||||
var decrypted = Secret.DecryptBytes(encrypted, nonce);
|
||||
Assert.That(plaintext, Is.EqualTo(decrypted));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue