diff options
Diffstat (limited to 'brillo/secure_blob.h')
-rw-r--r-- | brillo/secure_blob.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/brillo/secure_blob.h b/brillo/secure_blob.h index e06646d..7705c1a 100644 --- a/brillo/secure_blob.h +++ b/brillo/secure_blob.h @@ -11,16 +11,13 @@ #include <brillo/asan.h> #include <brillo/brillo_export.h> -#include <brillo/secure_allocator.h> namespace brillo { +// TODO(sarthakkukreti): remove temp. SecureVector once we break SecureBlob's +// dependence on std::vector<uint8_t> using Blob = std::vector<uint8_t>; -// Define SecureVector as a vector using a SecureAllocator. -// Over time, the goal is to remove the differentiating functions -// from SecureBlob (to_string(), char_data()) till it converges with -// SecureVector. -using SecureVector = std::vector<uint8_t, SecureAllocator<uint8_t>>; +using SecureVector = std::vector<uint8_t>; // Conversion of Blob to/from std::string, where the string holds raw byte // contents. @@ -32,11 +29,10 @@ BRILLO_EXPORT Blob CombineBlobs(const std::initializer_list<Blob>& blobs); // SecureBlob erases the contents on destruction. It does not guarantee erasure // on resize, assign, etc. -class BRILLO_EXPORT SecureBlob : public SecureVector { +class BRILLO_EXPORT SecureBlob : public Blob { public: SecureBlob() = default; - // Inherit standard constructors from SecureVector. - using SecureVector::vector; + using Blob::vector; // Inherit standard constructors from vector. explicit SecureBlob(const Blob& blob); explicit SecureBlob(const std::string& data); ~SecureBlob(); |