]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | /********************************************************************** |
2 | Copyright(c) 2021 Arm Corporation All rights reserved. | |
3 | ||
4 | Redistribution and use in source and binary forms, with or without | |
5 | modification, are permitted provided that the following conditions | |
6 | are met: | |
7 | * Redistributions of source code must retain the above copyright | |
8 | notice, this list of conditions and the following disclaimer. | |
9 | * Redistributions in binary form must reproduce the above copyright | |
10 | notice, this list of conditions and the following disclaimer in | |
11 | the documentation and/or other materials provided with the | |
12 | distribution. | |
13 | * Neither the name of Arm Corporation nor the names of its | |
14 | contributors may be used to endorse or promote products derived | |
15 | from this software without specific prior written permission. | |
16 | ||
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
28 | **********************************************************************/ | |
29 | ||
30 | #include <string.h> | |
31 | #include "mh_sha1_murmur3_aarch64_internal.h" | |
32 | ||
33 | extern void mh_sha1_tail_asimd(uint8_t * partial_buffer, uint32_t total_len, | |
34 | uint32_t(*mh_sha1_segs_digests)[HASH_SEGS], | |
35 | uint8_t * frame_buffer, | |
36 | uint32_t mh_sha1_digest[SHA1_DIGEST_WORDS]); | |
37 | ||
38 | extern void mh_sha1_block_asimd(const uint8_t * input_data, | |
39 | uint32_t digests[SHA1_DIGEST_WORDS][HASH_SEGS], | |
40 | uint8_t frame_buffer[MH_SHA1_BLOCK_SIZE], uint32_t num_blocks); | |
41 | ||
42 | // mh_sha1_murmur3_update_asimd.c | |
43 | #define UPDATE_FUNCTION mh_sha1_murmur3_update_asimd | |
44 | #define BLOCK_FUNCTION mh_sha1_murmur3_block_asimd | |
45 | #include "mh_sha1_murmur3_x64_128_update_base.c" | |
46 | #undef UPDATE_FUNCTION | |
47 | #undef BLOCK_FUNCTION | |
48 | ||
49 | // mh_sha1_murmur3_finalize_asimd.c | |
50 | #define FINALIZE_FUNCTION mh_sha1_murmur3_finalize_asimd | |
51 | #define MH_SHA1_TAIL_FUNCTION mh_sha1_tail_asimd | |
52 | #include "mh_sha1_murmur3_x64_128_finalize_base.c" | |
53 | #undef FINALIZE_FUNCTION | |
54 | #undef MH_SHA1_TAIL_FUNCTION |