mirror of
https://github.com/sphildreth/roadie
synced 2024-11-12 23:47:07 +00:00
24 lines
No EOL
628 B
C#
24 lines
No EOL
628 B
C#
using Roadie.Library.Utility;
|
|
using System;
|
|
using Xunit;
|
|
|
|
namespace Roadie.Library.Tests
|
|
{
|
|
public class EncryptionHelperTests
|
|
{
|
|
[Fact]
|
|
public void EncryptAndDecrypt()
|
|
{
|
|
var key = Guid.NewGuid().ToString();
|
|
var value = Guid.NewGuid().ToString();
|
|
|
|
var encrypted = EncryptionHelper.Encrypt(value, key);
|
|
Assert.NotNull(encrypted);
|
|
Assert.NotEqual(encrypted, value);
|
|
|
|
var decrypted = EncryptionHelper.Decrypt(encrypted, key);
|
|
Assert.NotNull(decrypted);
|
|
Assert.Equal(decrypted, value);
|
|
}
|
|
}
|
|
} |