UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
md5.hpp
Go to the documentation of this file.
1/* $OpenBSD: md5.h,v 1.3 2014/11/16 17:39:09 tedu Exp $ */
2
3/*
4 * Last modified: 2024-02-01 --Ingo
5 * This code implements the MD5 message-digest algorithm.
6 * The algorithm is due to Ron Rivest. This code was
7 * written by Colin Plumb in 1993, no copyright is claimed.
8 * This code is in the public domain; do with it what you wish.
9 *
10 * Equivalent code is available from RSA Data Security, Inc.
11 * This code has been tested against that, and is equivalent,
12 * except that you don't need to include two pages of legalese
13 * with every copy.
14 */
15
26#ifndef UPNPLIB_MD5_HPP
27#define UPNPLIB_MD5_HPP
28
29#include <stddef.h>
30#include <stdint.h>
31
33#define MD5_BLOCK_LENGTH 64
34#define MD5_DIGEST_LENGTH 16
36
38struct MD5_CTX {
40 uint32_t state[4]; /* state */
41 uint64_t count; /* number of bits, mod 2^64 */
42 uint8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
44};
45
47void MD5Init(MD5_CTX*);
49void MD5Update(MD5_CTX*, const void*, size_t);
51void MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX* ctx);
53void MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_LENGTH]);
54
55#endif /* UPNPLIB_MD5_HPP */
void MD5Update(MD5_CTX *, const void *, size_t)
MD5 Update.
Definition md5.cpp:82
void MD5Init(MD5_CTX *)
MD5 Initialisation.
Definition md5.cpp:70
void MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_LENGTH])
MD5 Transform.
Definition md5.cpp:158
void MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx)
MD5 Final.
Definition md5.cpp:119
MD5 Context.
Definition md5.hpp:38