Pass Span instead of Memory

This commit is contained in:
eelke 2026-02-26 20:39:48 +01:00
parent 650fe99990
commit ccc00d8e80
10 changed files with 45 additions and 38 deletions

View file

@ -11,10 +11,7 @@ namespace IdentityShroud.Api.Tests.Mappers;
public class KeyServiceTests
{
private readonly IDekEncryptionService _dekEncryptionService = EncryptionServiceSubstitute.CreatePassthrough();
//private readonly IDataEncryptionService _dataEncryptionService = Substitute.For<IDataEncryptionService>();
//private readonly IKeyProviderFactory _keyProviderFactory = Substitute.For<IKeyProviderFactory>();
private readonly NullDekEncryptionService _dekEncryptionService = new();
[Fact]
public void Test()
@ -30,7 +27,7 @@ public class KeyServiceTests
{
Id = new("60bb79cf-4bac-4521-87f2-ac87cc15541f"),
KeyType = "RSA",
Key = new(EncryptionServiceSubstitute.KeyId, rsa.ExportPkcs8PrivateKey()),
Key = new(_dekEncryptionService.KeyId, rsa.ExportPkcs8PrivateKey()),
CreatedAt = DateTime.UtcNow,
Priority = 10,
};