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

Unified Diff: src/platform/cryptohome/entropy_source.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/entropy_source.h
diff --git a/src/platform/cryptohome/entropy_source.h b/src/platform/cryptohome/entropy_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..9ba3455fceab7a8746caec3314ffc933d8224441
--- /dev/null
+++ b/src/platform/cryptohome/entropy_source.h
@@ -0,0 +1,22 @@
+// 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.
+
+// EntropySource is the interface for objects that provide random bytes.
+
+#ifndef CRYPTOHOME_ENTROPY_SOURCE_H_
+#define CRYPTOHOME_ENTROPY_SOURCE_H_
+
+namespace cryptohome {
+
+class EntropySource {
+ public:
+ EntropySource() {}
+ virtual ~EntropySource() {}
+
+ virtual void GetSecureRandom(unsigned char *rand, int length) const = 0;
+};
+
+} // namespace cryptohome
+
+#endif // CRYPTOHOME_ENTROPY_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698