[runtime] Fix DISABLE_REFLECTION_EMIT build.
[mono.git] / mono / utils / mono-sha1.c
index 372ef2bcee9fe958c32d98ac2812d7eefc90d62d..4a6415f3fde705cff9e03433c353ad5fc06dfe05 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+\file
 SHA-1 in C
 By Steve Reid <sreid@sea-to-sky.net>
 100% Public Domain
@@ -77,18 +78,27 @@ A million repetitions of "a"
 
 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H
 
+/**
+ * mono_sha1_init:
+ */
 void
 mono_sha1_init (MonoSHA1Context* context)
 {
        CC_SHA1_Init (context);
 }
 
+/**
+ * mono_sha1_update:
+ */
 void
 mono_sha1_update (MonoSHA1Context* context, const guchar* data, guint32 len)
 {
        CC_SHA1_Update (context, data, len);
 }
 
+/**
+ * mono_sha1_final:
+ */
 void
 mono_sha1_final (MonoSHA1Context* context, unsigned char digest[20])
 {
@@ -147,7 +157,7 @@ typedef union {
 } CHAR64LONG16;
 CHAR64LONG16* block;
 #ifdef SHA1HANDSOFF
-static unsigned char workspace[64];
+    unsigned char workspace[64];
     block = (CHAR64LONG16*)workspace;
     memcpy(block, buffer, 64);
 #else
@@ -267,7 +277,10 @@ unsigned char finalcount[8];
 }
 
 #endif
+
+/**
+ * mono_sha1_get_digest:
+ */
 void
 mono_sha1_get_digest (const guchar *buffer, gint buffer_size, guchar digest [20])
 {      
@@ -280,15 +293,15 @@ mono_sha1_get_digest (const guchar *buffer, gint buffer_size, guchar digest [20]
 }
 
 /**
- * mono_sha1_get_digest_from_file: get the sha1 hash of a file
- * @filename: file name
- * @digest: 20 bytes buffer receiving the hash code.
+ * mono_sha1_get_digest_from_file:
+ * \param filename file name
+ * \param digest 20-byte buffer receiving the hash code.
  * 
- * Get the sha1 hash of a file. The result is put in 
- * the 20 bytes buffer @digest .
+ * Get the SHA-1 hash of a file. The result is put in 
+ * the 20-byte buffer \p digest.
  * 
- * If an IO error happens the value in @digest is not updated.
- **/
+ * If an IO error happens the value in \p digest is not updated.
+ */
 void
 mono_sha1_get_digest_from_file (const gchar *filename, guchar digest [20])
 {      
@@ -316,11 +329,11 @@ mono_sha1_get_digest_from_file (const gchar *filename, guchar digest [20])
        mono_sha1_final (&ctx, digest);
 }
 
-/*
+/**
  * mono_digest_get_public_token:
  *
  * Get the public token from public key data.
- * @token must point to at least 8 bytes of storage.
+ * \p token must point to at least 8 bytes of storage.
  */
 void 
 mono_digest_get_public_token (guchar* token, const guchar *pubkey, guint32 len)