Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
crypto_fuchsia.cc
Go to the documentation of this file.
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(DART_HOST_OS_FUCHSIA)
7
8#include "bin/crypto.h"
9
10#include <zircon/syscalls.h>
11
12namespace dart {
13namespace bin {
14
15bool 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(DART_HOST_OS_FUCHSIA)
int count
static bool GetRandomBytes(intptr_t count, uint8_t *buffer)
static const uint8_t buffer[]