Index: crypto/random.h |
diff --git a/crypto/random.h b/crypto/random.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..79915a091fe35d6084571d9222516e0a0e04073a |
--- /dev/null |
+++ b/crypto/random.h |
@@ -0,0 +1,19 @@ |
+// Copyright (c) 2011 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. |
+ |
+#ifndef CRYPTO_RANDOM_H_ |
+#define CRYPTO_RANDOM_H_ |
+#pragma once |
+ |
+#include <string> |
+ |
+// GetRandomBytes fills |output_length| bytes of |output| with |
+// cryptographically strong random data. |
+void GetRandomBytes(void* output, size_t output_length); |
Ryan Sleevi
2011/04/27 02:32:24
This makes the third implementation to get random
wtc
2011/04/28 19:42:22
GetRandomBytes should be moved to base/rand_util.h
|
+ |
+// Generate128BitRandomBase64String returns a string of length 22 containing |
+// cryptographically strong random data encoded in base64. |
+std::string Generate128BitRandomBase64String(); |
wtc
2011/04/28 19:42:22
API design issue: this function is not generally u
abarth-chromium
2011/04/29 07:47:11
http://codereview.chromium.org/6904118/ contains a
wtc
2011/04/29 18:07:08
abarth: yes. Your RandString function is equivale
|
+ |
+#endif // CRYPTO_RANDOM_H_ |