blob: c2fe425aa2fe4ea8be9398bf02a8f94b81e282f5 [file] [log] [blame]
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(HOST_OS_FUCHSIA)
#include "bin/crypto.h"
#include <zircon/syscalls.h>
namespace dart {
namespace bin {
bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
zx_cprng_draw(buffer, count);
return true;
}
} // namespace bin
} // namespace dart
#endif // defined(HOST_OS_FUCHSIA)