Files
sharpcompress/src/SharpCompress/Crypto/BlockTransformer.cs
2026-02-13 14:43:56 +00:00

18 lines
458 B
C#

using System;
using System.Security.Cryptography;
namespace SharpCompress.Crypto;
internal class BlockTransformer(ICryptoTransform transformer) : IDisposable
{
public byte[] ProcessBlock(ReadOnlySpan<byte> cipherText)
{
var decryptedBytes = new byte[cipherText.Length];
transformer.TransformBlock(cipherText.ToArray(), 0, cipherText.Length, decryptedBytes, 0);
return decryptedBytes;
}
public void Dispose() { }
}