Happy flow for creating realms works

But needs more validating...
This commit is contained in:
eelke 2026-02-08 11:57:57 +01:00
parent f99c97f392
commit 92b34bd0b5
25 changed files with 437 additions and 12 deletions

View file

@ -0,0 +1,22 @@
using System.Security.Cryptography;
using IdentityShroud.Core.Services;
namespace IdentityShroud.Core.Tests.Services;
public class EncryptionServiceTests
{
[Fact]
public void RoundtripWorks()
{
// setup
string key = Convert.ToBase64String(RandomNumberGenerator.GetBytes(32));
EncryptionService sut = new(key);
byte[] input = RandomNumberGenerator.GetBytes(16);
// act
var cipher = sut.Encrypt(input);
var result = sut.Decrypt(cipher);
Assert.Equal(input, result);
}
}