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

@ -0,0 +1,18 @@
using IdentityShroud.Core.Contracts;
using IdentityShroud.Core.Security;
namespace IdentityShroud.TestUtils.Substitutes;
public class NullDekEncryptionService : IDekEncryptionService
{
public KekId KeyId { get; } = KekId.NewId();
public EncryptedDek Encrypt(ReadOnlySpan<byte> plain)
{
return new(KeyId, plain.ToArray());
}
public byte[] Decrypt(EncryptedDek input)
{
return input.Value;
}
}