|
|
1.1 ! root 1: /* ! 2: Copyright (c) 2008 TrueCrypt Foundation. All rights reserved. ! 3: ! 4: Governed by the TrueCrypt License 2.4 the full text of which is contained ! 5: in the file License.txt included in TrueCrypt binary and source code ! 6: distribution packages. ! 7: */ ! 8: ! 9: #ifndef TC_HEADER_Volume_VolumePasswordCache ! 10: #define TC_HEADER_Volume_VolumePasswordCache ! 11: ! 12: #include "Platform/Platform.h" ! 13: #include "VolumePassword.h" ! 14: ! 15: namespace TrueCrypt ! 16: { ! 17: typedef list < shared_ptr < VolumePassword > > CachedPasswordList; ! 18: ! 19: class VolumePasswordCache ! 20: { ! 21: public: ! 22: static CachedPasswordList GetPasswords (); ! 23: static bool IsEmpty () { return CachedPasswords.empty(); } ! 24: static void Store (const VolumePassword &newPassword); ! 25: static void Clear () { CachedPasswords.clear(); } ! 26: static const int Capacity = 4; ! 27: ! 28: protected: ! 29: static CachedPasswordList CachedPasswords; ! 30: ! 31: private: ! 32: VolumePasswordCache (); ! 33: }; ! 34: } ! 35: ! 36: #endif // TC_HEADER_Volume_VolumePasswordCache
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.