Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / utils / mono-rand-windows.c
index 97f57cee4ee331024d2088ed9b5b04c53ac151f6..638f8b38ed5d142f90a9905003f9448fe7fe2581 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-rand-windows.c: Windows rand support for Mono.
+/**
+ * \file
+ * Windows rand support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -78,12 +79,10 @@ mono_rand_open (void)
 
 /**
  * mono_rand_init:
- * @seed: A string containing seed data
- * @seed_size: Length of seed string
- *
- * Returns: On success, a non-NULL handle which can be used to fetch random data from mono_rand_try_get_bytes. On failure, NULL.
- *
+ * \param seed A string containing seed data
+ * \param seed_size Length of seed string
  * Initializes an RNG client.
+ * \returns On success, a non-NULL handle which can be used to fetch random data from \c mono_rand_try_get_bytes. On failure, NULL.
  */
 gpointer
 mono_rand_init (guchar *seed, gint seed_size)
@@ -113,21 +112,19 @@ mono_rand_init (guchar *seed, gint seed_size)
 
 /**
  * mono_rand_try_get_bytes:
- * @handle: A pointer to an RNG handle. Handle is set to NULL on failure.
- * @buffer: A buffer into which to write random data.
- * @buffer_size: Number of bytes to write into buffer.
- * @error: Set on error.
- *
- * Returns: FALSE on failure and sets @error, TRUE on success.
- *
+ * \param handle A pointer to an RNG handle. Handle is set to NULL on failure.
+ * \param buffer A buffer into which to write random data.
+ * \param buffer_size Number of bytes to write into buffer.
+ * \param error Set on error.
  * Extracts bytes from an RNG handle.
+ * \returns FALSE on failure and sets \p error, TRUE on success.
  */
 gboolean
 mono_rand_try_get_bytes (gpointer *handle, guchar *buffer, gint buffer_size, MonoError *error)
 {
        MONO_WIN32_CRYPT_PROVIDER_HANDLE provider;
 
-       mono_error_init (error);
+       error_init (error);
 
        g_assert (handle);
        provider = (MONO_WIN32_CRYPT_PROVIDER_HANDLE) *handle;
@@ -160,8 +157,7 @@ mono_rand_try_get_bytes (gpointer *handle, guchar *buffer, gint buffer_size, Mon
 
 /**
  * mono_rand_close:
- * @handle: An RNG handle.
- *
+ * \param handle An RNG handle.
  * Releases an RNG handle.
  */
 void