ICSharpCode.SharpZipLib.Zip.ZipOutputStream.WriteEncryptionHeader C# (CSharp) Méthode

WriteEncryptionHeader() private méthode

private WriteEncryptionHeader ( long crcValue ) : void
crcValue long
Résultat void
        void WriteEncryptionHeader(long crcValue)
        {
            offset += ZipConstants.CryptoHeaderSize;

            InitializePassword(Password);

            byte[] cryptBuffer = new byte[ZipConstants.CryptoHeaderSize];
            var rnd = new Random();
            rnd.NextBytes(cryptBuffer);
            cryptBuffer[11] = (byte)(crcValue >> 24);

            EncryptBlock(cryptBuffer, 0, cryptBuffer.Length);
            baseOutputStream_.Write(cryptBuffer, 0, cryptBuffer.Length);
        }