mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
19 lines
514 B
C#
19 lines
514 B
C#
using System;
|
|
using LibHac.Crypto;
|
|
using Xunit;
|
|
|
|
namespace LibHac.Tests.CryptoTests
|
|
{
|
|
internal static class Common
|
|
{
|
|
internal static void CipherTestCore(byte[] inputData, byte[] expected, ICipher cipher)
|
|
{
|
|
var transformBuffer = new byte[inputData.Length];
|
|
Buffer.BlockCopy(inputData, 0, transformBuffer, 0, inputData.Length);
|
|
|
|
cipher.Transform(transformBuffer, transformBuffer);
|
|
|
|
Assert.Equal(expected, transformBuffer);
|
|
}
|
|
}
|
|
}
|