diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
commit | 20b85c03e751b4876fa3c92040464e483172b746 (patch) | |
tree | 734fadbfdbc143ec4465093857f4c239448715e0 /src/md5c.c | |
parent | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff) |
manual format adjustment
Diffstat (limited to 'src/md5c.c')
-rw-r--r-- | src/md5c.c | 56 |
1 files changed, 27 insertions, 29 deletions
@@ -1,27 +1,27 @@ -/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm - */ - -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ +/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm */ + +/* + Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All + rights reserved. + + License to copy and use this software is granted provided that it + is identified as the "RSA Data Security, Inc. MD5 Message-Digest + Algorithm" in all material mentioning or referencing this software + or this function. + + License is also granted to make and use derivative works provided + that such works are identified as "derived from the RSA Data + Security, Inc. MD5 Message-Digest Algorithm" in all material + mentioning or referencing the derived work. + + RSA Data Security, Inc. makes no representations concerning either + the merchantability of this software or the suitability of this + software for any particular purpose. It is provided "as is" + without express or implied warranty of any kind. + + These notices must be retained in any copies of any part of this + documentation and/or software. +*/ #include <stdint.h> @@ -52,9 +52,7 @@ static void Decode PROTO_LIST((UINT4 *, unsigned char *, unsigned int)); static void MD5_memcpy PROTO_LIST((POINTER, POINTER, unsigned int)); static void MD5_memset PROTO_LIST((POINTER, int, unsigned int)); -static unsigned char PADDING[64] = { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +static unsigned char PADDING[64] = {0x80, 0}; /* F, G, H and I are basic MD5 functions. */ #define F(x, y, z) (((x) & (y)) | ((~x) & (z))) @@ -257,7 +255,7 @@ unsigned char block[64]; MD5_memset((POINTER)x, 0, sizeof(x)); } -/* Encodes input (UINT4) into output (unsigned char). +/* Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */ static void Encode(output, input, len) unsigned char *output; @@ -274,7 +272,7 @@ unsigned int len; } } -/* Decodes input (unsigned char) into output (UINT4). +/* Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */ static void Decode(output, input, len) UINT4 *output; |