Update README.md
[nemesis.git] / Platform / MemoryStream.h
1 /*
2  Copyright (c) 2008 TrueCrypt Developers Association. All rights reserved.
3
4  Governed by the TrueCrypt License 3.0 the full text of which is contained in
5  the file License.txt included in TrueCrypt binary and source code distribution
6  packages.
7 */
8
9 #ifndef TC_HEADER_Platform_MemoryStream
10 #define TC_HEADER_Platform_MemoryStream
11
12 #include "PlatformBase.h"
13 #include "Stream.h"
14
15 namespace TrueCrypt
16 {
17         class MemoryStream : public Stream
18         {
19         public:
20                 MemoryStream () : ReadPosition (0) { }
21                 MemoryStream (const ConstBufferPtr &data);
22                 virtual ~MemoryStream () { }
23
24                 operator ConstBufferPtr () const { return ConstBufferPtr (&Data[0], Data.size()); }
25
26                 virtual uint64 Read (const BufferPtr &buffer);
27                 virtual void ReadCompleteBuffer (const BufferPtr &buffer);
28                 virtual void Write (const ConstBufferPtr &data);
29
30         protected:
31                 vector <byte> Data;
32                 size_t ReadPosition;
33         };
34 }
35
36 #endif // TC_HEADER_Platform_MemoryStream
This page took 0.026007 seconds and 3 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.