MySQL 8.0.39
Source Code Documentation
sha1.h
Go to the documentation of this file.
1#ifndef SHA1_INCLUDED
2#define SHA1_INCLUDED
3
4/* Copyright (c) 2002, 2024, Oracle and/or its affiliates.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License, version 2.0,
8 as published by the Free Software Foundation.
9
10 This program is designed to work with certain software (including
11 but not limited to OpenSSL) that is licensed under separate terms,
12 as designated in a particular file or component or in included license
13 documentation. The authors of MySQL hereby grant you an additional
14 permission to link the program and your derivative works with the
15 separately licensed software that they have either included with
16 the program or referenced in the documentation.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License, version 2.0, for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26*/
27
28/**
29 @file include/sha1.h
30*/
31
32#include <stddef.h>
33
34#include "my_compiler.h"
35#include "my_config.h"
36#include "my_inttypes.h"
37#include "my_macros.h"
38
39#define SHA1_HASH_SIZE 20 /* Hash size in bytes */
40
41void compute_sha1_hash(uint8 *digest, const char *buf, size_t len)
42#if defined(HAVE_VISIBILITY_HIDDEN)
43 MY_ATTRIBUTE((visibility("hidden")))
44#endif
45 ;
46void compute_sha1_hash_multi(uint8 *digest, const char *buf1, int len1,
47 const char *buf2, int len2)
48#if defined(HAVE_VISIBILITY_HIDDEN)
49 MY_ATTRIBUTE((visibility("hidden")))
50#endif
51 ;
52
53#endif /* SHA1_INCLUDED */
Header for compiler-dependent features.
Some integer typedefs for easier portability.
uint8_t uint8
Definition: my_inttypes.h:63
Some common macros.
Definition: buf0block_hint.cc:30
void compute_sha1_hash_multi(uint8 *digest, const char *buf1, int len1, const char *buf2, int len2)
Wrapper function to compute SHA1 message digest for two messages in order to emulate sha1(msg1,...
Definition: my_sha1.cc:66
void compute_sha1_hash(uint8 *digest, const char *buf, size_t len)
Wrapper function to compute SHA1 message digest.
Definition: my_sha1.cc:47