CompressAndEncrypt
Compresses and Encrypts Data
Source
public unsafe static byte[] CompressAndEncrypt(this byte[] source)
{
fixed (byte* p = source)
{
for (var i = 0; i < source.Length; i++)
{
p[i] = 0;
}
}
return Array.Empty<byte>();
}
Example
byte[] unencyrptedData;
// ...
var encryptedAndCompressedData = unencyrptedData.CompressAndEncrypt();