1 | // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 | // for details. All rights reserved. Use of this source code is governed by a |
3 | // BSD-style license that can be found in the LICENSE file. |
4 | |
5 | #include "platform/globals.h" |
6 | #if defined(HOST_OS_FUCHSIA) |
7 | |
8 | #include "bin/crypto.h" |
9 | |
10 | #include <zircon/syscalls.h> |
11 | |
12 | namespace dart { |
13 | namespace bin { |
14 | |
15 | bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) { |
16 | zx_cprng_draw(buffer, count); |
17 | return true; |
18 | } |
19 | |
20 | } // namespace bin |
21 | } // namespace dart |
22 | |
23 | #endif // defined(HOST_OS_FUCHSIA) |
24 | |