Pepper_31_C++_interfaces
crypto_dev.h
Go to the documentation of this file.
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef PPAPI_CPP_DEV_CRYPTO_DEV_H_
6 #define PPAPI_CPP_DEV_CRYPTO_DEV_H_
7 
8 #include "ppapi/c/pp_stdint.h"
9 
10 /// @file
11 /// This file defines APIs related to cryptography.
12 
13 namespace pp {
14 
15 /// APIs related to cryptography.
16 class Crypto_Dev {
17  public:
19 
20  /// A function that fills the buffer with random bytes. This may be slow, so
21  /// avoid getting more bytes than needed.
22  ///
23  /// @param[out] buffer The buffer to receive the random bytes.
24  /// @param[in] num_bytes A number of random bytes to produce.
25  /// @return True on success, false on failure.
26  bool GetRandomBytes(char* buffer, uint32_t num_bytes);
27 };
28 
29 } // namespace pp
30 
31 #endif // PPAPI_CPP_DEV_CRYPTO_DEV_H_
APIs related to cryptography.
Definition: crypto_dev.h:16
bool GetRandomBytes(char *buffer, uint32_t num_bytes)