2026-02-27 17:57:42 +00:00
|
|
|
using IdentityShroud.Core.Contracts;
|
2026-03-16 19:15:04 +01:00
|
|
|
using IdentityShroud.Core.Model;
|
2026-02-27 17:57:42 +00:00
|
|
|
using IdentityShroud.Core.Security;
|
|
|
|
|
|
|
|
|
|
namespace IdentityShroud.TestUtils.Substitutes;
|
|
|
|
|
|
|
|
|
|
public class NullDataEncryptionService : IDataEncryptionService
|
|
|
|
|
{
|
|
|
|
|
public DekId KeyId { get; } = DekId.NewId();
|
2026-03-16 19:15:04 +01:00
|
|
|
public EncryptedValue Encrypt(RealmDek key, ReadOnlySpan<byte> plain)
|
2026-02-27 17:57:42 +00:00
|
|
|
{
|
|
|
|
|
return new(KeyId, plain.ToArray());
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-16 19:15:04 +01:00
|
|
|
public byte[] Decrypt(IReadOnlyList<RealmDek> keys, EncryptedValue input)
|
2026-02-27 17:57:42 +00:00
|
|
|
{
|
|
|
|
|
return input.Value;
|
|
|
|
|
}
|
|
|
|
|
}
|