.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Glue code for the SHA256 Secure Hash Algorithm assembly implementation |
---|
3 | 4 | * using optimized ARM assembler and NEON instructions. |
---|
.. | .. |
---|
7 | 8 | * This file is based on sha256_ssse3_glue.c: |
---|
8 | 9 | * Copyright (C) 2013 Intel Corporation |
---|
9 | 10 | * Author: Tim Chen <tim.c.chen@linux.intel.com> |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify it |
---|
12 | | - * under the terms of the GNU General Public License as published by the Free |
---|
13 | | - * Software Foundation; either version 2 of the License, or (at your option) |
---|
14 | | - * any later version. |
---|
15 | | - * |
---|
16 | 11 | */ |
---|
17 | 12 | |
---|
18 | 13 | #include <crypto/internal/hash.h> |
---|
.. | .. |
---|
20 | 15 | #include <linux/init.h> |
---|
21 | 16 | #include <linux/module.h> |
---|
22 | 17 | #include <linux/mm.h> |
---|
23 | | -#include <linux/cryptohash.h> |
---|
24 | 18 | #include <linux/types.h> |
---|
25 | 19 | #include <linux/string.h> |
---|
26 | 20 | #include <crypto/sha.h> |
---|
.. | .. |
---|
44 | 38 | } |
---|
45 | 39 | EXPORT_SYMBOL(crypto_sha256_arm_update); |
---|
46 | 40 | |
---|
47 | | -static int sha256_final(struct shash_desc *desc, u8 *out) |
---|
| 41 | +static int crypto_sha256_arm_final(struct shash_desc *desc, u8 *out) |
---|
48 | 42 | { |
---|
49 | 43 | sha256_base_do_finalize(desc, |
---|
50 | 44 | (sha256_block_fn *)sha256_block_data_order); |
---|
.. | .. |
---|
56 | 50 | { |
---|
57 | 51 | sha256_base_do_update(desc, data, len, |
---|
58 | 52 | (sha256_block_fn *)sha256_block_data_order); |
---|
59 | | - return sha256_final(desc, out); |
---|
| 53 | + return crypto_sha256_arm_final(desc, out); |
---|
60 | 54 | } |
---|
61 | 55 | EXPORT_SYMBOL(crypto_sha256_arm_finup); |
---|
62 | 56 | |
---|
.. | .. |
---|
64 | 58 | .digestsize = SHA256_DIGEST_SIZE, |
---|
65 | 59 | .init = sha256_base_init, |
---|
66 | 60 | .update = crypto_sha256_arm_update, |
---|
67 | | - .final = sha256_final, |
---|
| 61 | + .final = crypto_sha256_arm_final, |
---|
68 | 62 | .finup = crypto_sha256_arm_finup, |
---|
69 | 63 | .descsize = sizeof(struct sha256_state), |
---|
70 | 64 | .base = { |
---|
.. | .. |
---|
78 | 72 | .digestsize = SHA224_DIGEST_SIZE, |
---|
79 | 73 | .init = sha224_base_init, |
---|
80 | 74 | .update = crypto_sha256_arm_update, |
---|
81 | | - .final = sha256_final, |
---|
| 75 | + .final = crypto_sha256_arm_final, |
---|
82 | 76 | .finup = crypto_sha256_arm_finup, |
---|
83 | 77 | .descsize = sizeof(struct sha256_state), |
---|
84 | 78 | .base = { |
---|