Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2010)

Unified Diff: src/platform/cryptohome/secure_blob.h

Issue 2051003: Initial patch from Will. (Closed) Base URL: ssh://git@chromiumos-git/chromiumos
Patch Set: Address style nits. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/cryptohome/secure_blob.h
diff --git a/src/platform/cryptohome/secure_blob.h b/src/platform/cryptohome/secure_blob.h
new file mode 100644
index 0000000000000000000000000000000000000000..aa5afd1ac8582adaa2581e48a1e72cf67bb16c55
--- /dev/null
+++ b/src/platform/cryptohome/secure_blob.h
@@ -0,0 +1,30 @@
+// 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 SECURE_BLOB_H_
+#define SECURE_BLOB_H_
+
+#include "chromeos/utility.h"
+
+namespace cryptohome {
+
+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);
+ virtual ~SecureBlob();
+
+ void resize(size_type sz);
+ void resize(size_type sz, const SecureBlobElement& x);
+};
+
+} // cryptohome
+
+#endif // SECURE_BLOB_H_

Powered by Google App Engine
This is Rietveld 408576698