/* Derived from source code of TrueCrypt 7.1a, which is Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed by the TrueCrypt License 3.0. Modifications and additions to the original source code (contained in this file) and all other portions of this file are Copyright (c) 2013-2017 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source code distribution packages. */ #ifndef TC_HEADER_Platform_SerializerFactory #define TC_HEADER_Platform_SerializerFactory #include #include "PlatformBase.h" #include "StringConverter.h" namespace VeraCrypt { class Serializable; class SerializerFactory { public: ~SerializerFactory (); static void Deinitialize (); static string GetName (const type_info &typeInfo); static Serializable *GetNewSerializable (const string &typeName); static void Initialize (); struct MapEntry { MapEntry () { } MapEntry (const string &typeName, Serializable* (*getNewPtr) ()) : TypeName (typeName), GetNewPtr (getNewPtr) { } MapEntry &operator= (const MapEntry &right) { TypeName = right.TypeName; GetNewPtr = right.GetNewPtr; return *this; } string TypeName; Serializable* (*GetNewPtr) (); }; static map *NameToTypeMap; static map *TypeToNameMap; protected: SerializerFactory (); static int UseCount; }; } #define TC_SERIALIZER_FACTORY_ADD_EXCEPTION_SET(TYPE) \ struct TYPE##SerializerFactoryInitializer \ { \ TYPE##SerializerFactoryInitializer () \ { \ SerializerFactory::Initialize(); \ TC_EXCEPTION_SET; \ } \ ~TYPE##SerializerFactoryInitializer () \ { \ SerializerFactory::Deinitialize(); \ } \ }; \ static TYPE##SerializerFactoryInitializer TYPE##SerializerFactoryInitializer #define TC_SERIALIZER_FACTORY_ADD_CLASS(TYPE) \ struct TYPE##SerializerFactoryInitializer \ { \ TYPE##SerializerFactoryInitializer () \ { \ SerializerFactory::Initialize(); \ TC_SERIALIZER_FACTORY_ADD (TYPE); \ } \ ~TYPE##SerializerFactoryInitializer () \ { \ SerializerFactory::Deinitialize(); \ } \ }; \ static TYPE##SerializerFactoryInitializer TYPE##SerializerFactoryInitializerInst #define TC_SERIALIZER_FACTORY_ADD(TYPE) \ (*SerializerFactory::NameToTypeMap)[#TYPE] = SerializerFactory::MapEntry (StringConverter::GetTypeName (typeid (TYPE)), &TYPE::GetNewSerializable); \ (*SerializerFactory::TypeToNameMap)[StringConverter::GetTypeName (typeid (TYPE))] = #TYPE #endif // TC_HEADER_Platform_SerializerFactory e='submit' value='search'/>
blob: f50655d2237dea59a36470fc855fd62343f9aa22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>VeraCrypt - Free Open source disk encryption with strong security for the Paranoid</title>
<meta name="description" content="VeraCrypt is free open-source disk encryption software for Windows, Mac OS X and Linux. In case an attacker forces you to reveal the password, VeraCrypt provides plausible deniability. In contrast to file encryption, data encryption performed by VeraCrypt is real-time (on-the-fly), automatic, transparent, needs very little memory, and does not involve temporary unencrypted files."/>
<meta name="keywords" content="encryption, security"/>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div>                      
<a href="https://www.veracrypt.fr/en/Home.html"><img src="VeraCrypt128x128.png" alt="VeraCrypt"/></a>
</div>

<div id="menu">
	<ul>
	  <li><a href="Home.html">Home</a></li>
	  <li><a href="/code/">Source Code</a></li>
	  <li><a href="Downloads.html">Downloads</a></li>
	  <li><a class="active" href="Documentation.html">Documentation</a></li>
	  <li><a href="Donation.html">Donate</a></li>
	  <li><a href="https://sourceforge.net/p/veracrypt/discussion/" target="_blank">Forums</a></li>
	</ul>
</div>

<div>
<p>
<a href="Documentation.html">Documentation</a>           
<img src="arrow_right.gif" alt=">>" style="margin-top: 5px">
<a href="Pipelining.html">Pipelining</a>
</p></div>

<div class="wikidoc">
<h1>Pipelining</h1>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
When encrypting or decrypting data, VeraCrypt uses so-called pipelining (asynchronous processing). While an application is loading a portion of a file from a VeraCrypt-encrypted volume/drive, VeraCrypt is automatically decrypting it (in RAM). Thanks to pipelining,
 the application does not have wait for any portion of the file to be decrypted and it can start loading other portions of the file right away. The same applies to encryption when writing data to an encrypted volume/drive.</div>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
Pipelining allows data to be read from and written to an encrypted drive as fast as if the drive was not encrypted (the same applies to file-hosted and partition-hosted VeraCrypt
<a href="VeraCrypt%20Volume.html" style="text-align:left; color:#0080c0; text-decoration:none.html">
volumes</a>).*</div>
<div style="text-align:left; margin-top:19px; margin-bottom:19px; padding-top:0px; padding-bottom:0px">
Note: Pipelining is implemented only in the Windows versions of VeraCrypt.</div>
<p>&nbsp;</p>
<hr align="left" size="1" width="189" style="text-align:left; height:0px; border-width:0px 1px 1px; border-style:solid; border-color:#000000">
<p><span style="text-align:left; font-size:10px; line-height:12px">* Some solid-state drives compress data internally, which appears to increase the actual read/write speed when the data is compressible (for example, text files). However, encrypted data cannot
 be compressed (as it appears to consist solely of random &quot;noise&quot; without any compressible patterns). This may have various implications. For example, benchmarking software that reads or writes compressible data (such as sequences of zeroes) will report lower
 speeds on encrypted volumes than on unencrypted volumes (to avoid this, use benchmarking software that reads/writes random or other kinds of uncompressible data)</span><span style="text-align:left; font-size:10px; line-height:12px">.</span></p>
</div><div class="ClearBoth"></div></body></html>