| Index: secure_blob.h
|
| diff --git a/secure_blob.h b/secure_blob.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fff1a6f7219320164a282f278455bfd270d54743
|
| --- /dev/null
|
| +++ b/secure_blob.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef TPM_INIT_SECURE_BLOB_H_
|
| +#define TPM_INIT_SECURE_BLOB_H_
|
| +
|
| +#include <chromeos/utility.h>
|
| +
|
| +namespace tpm_init {
|
| +
|
| +typedef unsigned char SecureBlobElement;
|
| +
|
| +// SecureBlob erases the contents on destruction. It does not guarantee erasure
|
| +// on resize, assign, etc.
|
| +class SecureBlob : public chromeos::Blob {
|
| + public:
|
| + SecureBlob();
|
| + SecureBlob(chromeos::Blob::const_iterator begin,
|
| + chromeos::Blob::const_iterator end);
|
| + explicit SecureBlob(int size);
|
| + SecureBlob(const unsigned char* from, int from_length);
|
| + SecureBlob(const char* from, int from_length);
|
| + virtual ~SecureBlob();
|
| +
|
| + void resize(size_type sz);
|
| + void resize(size_type sz, const SecureBlobElement& x);
|
| +
|
| + void clear_contents();
|
| +
|
| + void* data();
|
| + const void* const_data() const;
|
| +};
|
| +
|
| +} // tpm_init
|
| +
|
| +#endif // TPM_INIT_SECURE_BLOB_H_
|
|
|