18 lines
538 B
C#
18 lines
538 B
C#
|
|
using IdentityShroud.Core.Contracts;
|
||
|
|
|
||
|
|
namespace IdentityShroud.Core.Tests.Substitutes;
|
||
|
|
|
||
|
|
public static class EncryptionServiceSubstitute
|
||
|
|
{
|
||
|
|
public static IEncryptionService CreatePassthrough()
|
||
|
|
{
|
||
|
|
var encryptionService = Substitute.For<IEncryptionService>();
|
||
|
|
encryptionService
|
||
|
|
.Encrypt(Arg.Any<byte[]>())
|
||
|
|
.Returns(x => x.ArgAt<byte[]>(0));
|
||
|
|
encryptionService
|
||
|
|
.Decrypt(Arg.Any<byte[]>())
|
||
|
|
.Returns(x => x.ArgAt<byte[]>(0));
|
||
|
|
return encryptionService;
|
||
|
|
}
|
||
|
|
}
|