VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
AgeCommit message (Expand)AuthorFilesLines
2015-08-06Update license information to reflect the use of a dual license Apache 2.0 an...Mounir IDRASSI1-9/+12
2015-07-13Windows: on 64-bit Windows, more System favorite service from SysWoW64 to Sys...Mounir IDRASSI1-2/+2
2015-07-13Windows: Modify PIM parts in GUI to make it easier to use. Users must explici...Mounir IDRASSI1-1/+7
2015-07-11Use Pim name for internal variables instead of the old name PinMounir IDRASSI1-16/+16
2015-07-06Windows: Display source location of errors in order to help diagnose issues r...Mounir IDRASSI1-58/+58
2015-06-10Windows: solve installer issue on Windows 10 caused by failure to overwrite V...Mounir IDRASSI1-4/+33
2015-06-08Windows: rename PIN to PIM to avoid confusion. Better error messages.Mounir IDRASSI1-3/+3
2015-06-07Windows: Add support for PIN in favorites. Several enhancements to GUI handli...Mounir IDRASSI1-8/+26
2015-05-29Windows: workaround FormatEx keeping references on formatted volume by adding...Mounir IDRASSI1-4/+14
2015-05-27.highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 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_Buffer
#define TC_HEADER_Platform_Buffer

#include "PlatformBase.h"
#include "Memory.h"

namespace VeraCrypt
{

	class ConstBufferPtr
	{
	public:
		ConstBufferPtr ()
			: DataPtr (nullptr), DataSize (0) { }
		ConstBufferPtr (const byte *data, size_t size)
			: DataPtr (data), DataSize (size) { }
		virtual ~ConstBufferPtr () { }

		operator const byte * () const { return DataPtr; }

		bool IsDataEqual (const ConstBufferPtr &other) const { return Memory::Compare (DataPtr, DataSize, other.DataPtr, other.DataSize) == 0; }
		const byte *Get () const { return DataPtr; }
		ConstBufferPtr GetRange (size_t offset, size_t size) const;
		void Set (const byte *data, size_t size) { DataPtr = data; DataSize = size; }
		size_t Size () const { return DataSize; }

	protected:
		const byte *DataPtr;
		size_t DataSize;
	};


	class BufferPtr
	{
	public:
		BufferPtr ()
			: DataPtr (nullptr), DataSize (0) { }
		BufferPtr (byte *data, size_t size)
			: DataPtr (data), DataSize (size) { }
		virtual ~BufferPtr () { }

		operator byte * () const { return DataPtr; }
		void CopyFrom (const ConstBufferPtr &bufferP2014-12-04
Windows: correct issue in displaying PDF of User Guide.Mounir IDRASSI1-2/+2
2014-12-04Windows: update URLs to points to the online documentation. Use a dedicated d...Mounir IDRASSI1-3/+103
2014-11-11Windows: Avoid calling RegCloseKey on an invalid handle.Mounir IDRASSI1-6/+7
2014-11-10Windows: close file handle if the call to GetFileSize fails.Mounir IDRASSI1-0/+3
2014-11-08Simplify code handling iterations count: in boot mode, we'll set the correct ...Mounir IDRASSI1-1/+1
2014-11-08Implement support for creating and booting encrypted partition using SHA-256....Mounir IDRASSI1-0/+12
2014-11-08Use absolute path in ShellExecute call that was missed when the security fix ...Mounir IDRASSI1-1/+1
2014-11-08Remove driver version test that is non application to VeraCrypt and that was ...Mounir IDRASSI1-3/+0
2014-11-08Correctly handle dialogs from previous versions that used 'TRUE' instead of '...Mounir IDRASSI1-2/+4
2014-11-08Add option in select the number of passes for volume header over-writing. By ...Mounir IDRASSI1-5/+14
2014-11-08Remove remaining legacy cryptographic algorithms that are never used by VeraC...Mounir IDRASSI1-10/+0
class="n">byte *Ptr () const { return DataPtr; } virtual void Erase (); virtual void Free (); virtual BufferPtr GetRange (size_t offset, size_t size) const; virtual size_t Size () const { return DataSize; } virtual size_t Alignment () const { return DataAlignment; } virtual bool IsAllocated () const { return DataSize != 0; } virtual void Zero (); virtual operator byte * () const { return DataPtr; } virtual operator BufferPtr () const { return BufferPtr (DataPtr, DataSize); } virtual operator ConstBufferPtr () const { return ConstBufferPtr (DataPtr, DataSize); } protected: byte *DataPtr; size_t DataSize; size_t DataAlignment; private: Buffer (const Buffer &); Buffer &operator= (const Buffer &); }; class SecureBuffer : public Buffer { public: SecureBuffer () { } SecureBuffer (size_t size, size_t alignment = 0); SecureBuffer (const ConstBufferPtr &bufferPtr) { CopyFrom (bufferPtr); } virtual ~SecureBuffer (); virtual void Allocate (size_t size, size_t alignment = 0); virtual void Free (); private: SecureBuffer (const SecureBuffer &); SecureBuffer &operator= (const SecureBuffer &); }; } #endif // TC_HEADER_Platform_Buffer