18 lines
445 B
C#
18 lines
445 B
C#
|
|
using IdentityShroud.Core.Contracts;
|
||
|
|
using IdentityShroud.Core.Security;
|
||
|
|
|
||
|
|
namespace IdentityShroud.TestUtils.Substitutes;
|
||
|
|
|
||
|
|
public class NullDataEncryptionService : IDataEncryptionService
|
||
|
|
{
|
||
|
|
public DekId KeyId { get; } = DekId.NewId();
|
||
|
|
public EncryptedValue Encrypt(ReadOnlySpan<byte> plain)
|
||
|
|
{
|
||
|
|
return new(KeyId, plain.ToArray());
|
||
|
|
}
|
||
|
|
|
||
|
|
public byte[] Decrypt(EncryptedValue input)
|
||
|
|
{
|
||
|
|
return input.Value;
|
||
|
|
}
|
||
|
|
}
|