mirror of
https://github.com/vgough/encfs.git
synced 2025-08-13 07:37:10 +02:00
Implement more Botan support.
git-svn-id: http://encfs.googlecode.com/svn/trunk@99 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
@ -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_;
|
||||
}
|
||||
|
Reference in New Issue
Block a user