API Documentation
Loading...
Searching...
No Matches
md5.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: md5
29Included in API: False
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33/*
34 * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
35 * MD5 Message-Digest Algorithm (RFC 1321).
36 *
37 * Homepage:
38 * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
39 *
40 * Author:
41 * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
42 *
43 * This software was written by Alexander Peslyak in 2001. No copyright is
44 * claimed, and the software is hereby placed in the public domain.
45 * In case this attempt to disclaim copyright and place the software in the
46 * public domain is deemed null and void, then the software is
47 * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
48 * general public under the following terms:
49 *
50 * Redistribution and use in source and binary forms, with or without
51 * modification, are permitted.
52 *
53 * There's ABSOLUTELY NO WARRANTY, express or implied.
54 *
55 * See md5.c for more information.
56 */
57
58#ifdef HAVE_OPENSSL
59#include <openssl/md5.h>
60#elif !defined(_MD5_H)
61#define _MD5_H
62namespace NDEVR
63{
64 typedef unsigned int MD5_u32plus;
65 /**--------------------------------------------------------------------------------------------------
66 \brief Struct for storing md5 information
67 **/
68 typedef struct {
70 MD5_u32plus a, b, c, d;
71 unsigned char buffer[64];
72 MD5_u32plus block[16];
73 } MD5_CTX;
74 /**--------------------------------------------------------------------------------------------------
75 \brief Logic for creating an MD5 hash
76 **/
77 class MD5
78 {
79 public:
80 static void MD5_Init(MD5_CTX *ctx);
81 static void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size);
82 static void MD5_Final(unsigned char *result, MD5_CTX *ctx);
83 };
84}
85#endif
86
87
Logic for creating an MD5 hash.
Definition md5.h:78
static void MD5_Final(unsigned char *result, MD5_CTX *ctx)
static void MD5_Init(MD5_CTX *ctx)
static void MD5_Update(MD5_CTX *ctx, const void *data, unsigned long size)
Definition ACIColor.h:37
unsigned int MD5_u32plus
Definition md5.h:64
Struct for storing md5 information.
Definition md5.h:68
MD5_u32plus a
Definition md5.h:70
MD5_u32plus hi
Definition md5.h:69