MiniOB
1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
src
common
math
md5.h
1
/* Copyright (c) 2021 OceanBase and/or its affiliates. All rights reserved.
2
miniob is licensed under Mulan PSL v2.
3
You can use this software according to the terms and conditions of the Mulan PSL v2.
4
You may obtain a copy of Mulan PSL v2 at:
5
http://license.coscl.org.cn/MulanPSL2
6
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9
See the Mulan PSL v2 for more details. */
10
11
//
12
// Created by Longda on 2010
13
//
14
15
#pragma once
16
17
#include <stdio.h>
18
namespace
common {
19
20
typedef
unsigned
char
*POINTER;
21
typedef
unsigned
short
int
UINT2;
22
typedef
unsigned
int
UINT4;
23
24
typedef
struct
25
{
26
UINT4 state[4];
/* state (ABCD) */
27
UINT4 count[2];
/* number of bits, modulo 2^64 (lsb first) */
28
unsigned
char
buffer[64];
/* input buffer */
29
}
MD5_CTX
;
30
31
#ifdef __cplusplus
32
extern
"C"
{
33
#endif
34
41
int
MD5String(
char
*
string
,
unsigned
char
digest[16]);
42
49
int
MD5File(
char
*filename,
unsigned
char
digest[16]);
50
58
int
MD5Buffer(
char
*buffer,
unsigned
int
len,
unsigned
char
digest[16]);
59
60
void
MD5Init(
MD5_CTX
*);
61
62
void
MD5Update(
MD5_CTX
*,
unsigned
char
*,
unsigned
int
);
63
64
void
MD5Final(
unsigned
char
[16],
MD5_CTX
*);
65
66
#ifdef __cplusplus
67
}
68
#endif
69
70
}
// namespace common
common::MD5_CTX
Definition:
md5.h:25
制作者
1.9.5