mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-10-03 12:18:54 +00:00
18 lines
458 B
C#
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() { }
|
|
}
|