private void writeHeader ( ) throws IOException { /* Write out the header */ if ( passwordBased ) { macOutputStream . write ( AES256JNCryptor . VERSION ) ; macOutputStream . write ( AES256Ciphertext . FLAG_PASSWORD ) ; macOutputStream . write ( encryptionSalt ) ; macOutputStream . write ( hmacSalt ) ; macOutputStream . write ( iv ) ; } else { macOutputStream . write ( AES256JNCryptor . VERSION ) ; macOutputStream . write ( 0 ) ; macOutputStream . write ( iv ) ; } }
Writes the header data to the output stream .