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_ |