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

Unified Diff: crypto/random.h

Issue 10698177: Added crypto random-number generator (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use WriteInto Created 8 years, 5 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: crypto/random.h
diff --git a/crypto/random.h b/crypto/random.h
new file mode 100644
index 0000000000000000000000000000000000000000..86ae1e413d103a7adf3d6e07fad26e89dae760cc
--- /dev/null
+++ b/crypto/random.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#pragma once
Ryan Sleevi 2012/07/31 23:03:48 nit: remove this (per the great purge) It also us
+
+#ifndef CRYPTO_RANDOM_H_
+#define CRYPTO_RANDOM_H_
+
+#include "crypto/crypto_export.h"
+
+namespace crypto {
+
+// Fills the given buffer with |length| random bytes of cryptographically
+// secure random numbers.
+// |length| must be positive.
+CRYPTO_EXPORT void RandBytes(void *bytes, size_t length);
+
+}
+
+#endif
+
Ryan Sleevi 2012/07/31 23:03:48 delete blank line (but ensure newline terminated o

Powered by Google App Engine
This is Rietveld 408576698