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

WriteAESHeader() private méthode

private WriteAESHeader ( ZipEntry entry ) : void
entry ZipEntry
Résultat void
        private void WriteAESHeader(ZipEntry entry)
        {
            byte[] salt;
            byte[] pwdVerifier;
            InitializeAESPassword(entry, Password, out salt, out pwdVerifier);
            // File format for AES:
            // Size (bytes)   Content
            // ------------   -------
            // Variable       Salt value
            // 2              Password verification value
            // Variable       Encrypted file data
            // 10             Authentication code
            //
            // Value in the "compressed size" fields of the local file header and the central directory entry
            // is the total size of all the items listed above. In other words, it is the total size of the
            // salt value, password verification value, encrypted data, and authentication code.
            baseOutputStream_.Write(salt, 0, salt.Length);
            baseOutputStream_.Write(pwdVerifier, 0, pwdVerifier.Length);
        }