Implement more Botan support.

git-svn-id: http://encfs.googlecode.com/svn/trunk@99 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
Valient Gough
2013-06-17 03:11:46 +00:00
parent 95750d4539
commit bd182db260
9 changed files with 268 additions and 35 deletions

View File

@ -25,7 +25,9 @@
#include "base/types.h"
#ifdef WITH_BOTAN
#include <botan/secmem.h>
namespace Botan {
template <typename T> class SecureVector;
}
#endif
namespace encfs {
@ -69,21 +71,14 @@ class SecureMem
private:
#ifdef WITH_BOTAN
Botan::SecureVector<Botan::byte> data_;
Botan::SecureVector<unsigned char> *data_;
#else
byte *data_;
int size_;
#endif
};
#ifdef WITH_BOTAN
inline byte* SecureMem::data() const {
return const_cast<byte*>(data_.begin());
}
inline int SecureMem::size() const {
return data_.size();
}
#else
#ifndef WITH_BOTAN
inline byte* SecureMem::data() const {
return data_;
}