Skip to content

Commit

Permalink
[mono] Cleanup unused MD5 functions (#101335)
Browse files Browse the repository at this point in the history
  • Loading branch information
akoeplinger authored Apr 20, 2024
1 parent 5b89a10 commit 3e02af3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 462 deletions.
1 change: 0 additions & 1 deletion src/mono/mono/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ else()
endif()

set(utils_common_sources
mono-md5.c
mono-sha1.c
mono-logger.c
mono-logger-internals.h
Expand Down
46 changes: 0 additions & 46 deletions src/mono/mono/utils/mono-digest.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/**
* \file
* This code implements the MD5 message-digest algorithm.
* The algorithm is due to Ron Rivest. This code was
* written by Colin Plumb in 1993, no copyright is claimed.
* This code is in the public domain; do with it what you wish.
*
* Equivalent code is available from RSA Data Security, Inc.
* This code has been tested against that, and is equivalent,
* except that you don't need to include two pages of legalese
* with every copy.
*
* To compute the message digest of a chunk of bytes, declare an
* MD5Context structure, pass it to rpmMD5Init, call rpmMD5Update as
* needed on buffers full of bytes, and then call rpmMD5Final, which
* will fill a supplied 16-byte array with the digest.
*/

/* parts of this file are :
* Written March 1993 by Branko Lankester
* Modified June 1993 by Colin Plumb for altered md5.c.
* Modified October 1995 by Erik Troan for RPM
*/


Expand All @@ -36,35 +16,9 @@
#include <CommonCrypto/CommonDigest.h>

#define MonoSHA1Context CC_SHA1_CTX
#define MonoMD5Context CC_MD5_CTX

#else

typedef struct {
guint32 buf[4];
guint32 bits[2];
guchar in[64];
gint doByteReverse;
} MonoMD5Context;

#endif

MONO_API void mono_md5_get_digest (const guchar *buffer, gint buffer_size, guchar digest[16]);

/* use this one when speed is needed */
/* for use in provider code only */
MONO_API void mono_md5_get_digest_from_file (const gchar *filename, guchar digest[16]);

/* raw routines */
MONO_API void mono_md5_init (MonoMD5Context *ctx);
MONO_API void mono_md5_update (MonoMD5Context *ctx, const guchar *buf, guint32 len);
MONO_API void mono_md5_final (MonoMD5Context *ctx, guchar digest[16]);

uint64_t
mono_md5_ctx_byte_length (MonoMD5Context *ctx);

#if !HAVE_COMMONCRYPTO_COMMONDIGEST_H

typedef struct {
guint32 state[5];
guint32 count[2];
Expand Down
Loading

0 comments on commit 3e02af3

Please sign in to comment.