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

Unified Diff: crypto/symmetric_key.h

Issue 6683060: Private API for extensions like ssh-client that need access to TCP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed bugs + added apitest + rebased Created 9 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: crypto/symmetric_key.h
diff --git a/crypto/symmetric_key.h b/crypto/symmetric_key.h
index c5860b58c2bdea75dd3e2ed532991ef6e6601f30..8e2dfa0b5291ad3d0bd9ba8e04fae8ddefa833f8 100644
--- a/crypto/symmetric_key.h
+++ b/crypto/symmetric_key.h
@@ -33,6 +33,9 @@ class SymmetricKey {
virtual ~SymmetricKey();
+ // Generates cryptographically strong random bytes. Returns true on success.
+ static bool GenerateRandomBytes(size_t size_in_bits, uint8* out);
+
// Generates a random key suitable to be used with |algorithm| and of
// |key_size_in_bits| bits.
// The caller is responsible for deleting the returned SymmetricKey.

Powered by Google App Engine
This is Rietveld 408576698