.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Cryptographic API. |
---|
3 | 4 | * |
---|
.. | .. |
---|
9 | 10 | * Copyright (c) Alan Smithee. |
---|
10 | 11 | * Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk> |
---|
11 | 12 | * Copyright (c) Jean-Francois Dive <jef@linuxbe.org> |
---|
12 | | - * |
---|
13 | | - * This program is free software; you can redistribute it and/or modify it |
---|
14 | | - * under the terms of the GNU General Public License as published by the Free |
---|
15 | | - * Software Foundation; either version 2 of the License, or (at your option) |
---|
16 | | - * any later version. |
---|
17 | | - * |
---|
18 | 13 | */ |
---|
19 | 14 | #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 <crypto/sha.h> |
---|
26 | 20 | #include <crypto/sha1_base.h> |
---|
.. | .. |
---|
36 | 30 | static void sha1_generic_block_fn(struct sha1_state *sst, u8 const *src, |
---|
37 | 31 | int blocks) |
---|
38 | 32 | { |
---|
39 | | - u32 temp[SHA_WORKSPACE_WORDS]; |
---|
| 33 | + u32 temp[SHA1_WORKSPACE_WORDS]; |
---|
40 | 34 | |
---|
41 | 35 | while (blocks--) { |
---|
42 | | - sha_transform(sst->state, src, temp); |
---|
| 36 | + sha1_transform(sst->state, src, temp); |
---|
43 | 37 | src += SHA1_BLOCK_SIZE; |
---|
44 | 38 | } |
---|
45 | 39 | memzero_explicit(temp, sizeof(temp)); |
---|
.. | .. |
---|
92 | 86 | crypto_unregister_shash(&alg); |
---|
93 | 87 | } |
---|
94 | 88 | |
---|
95 | | -module_init(sha1_generic_mod_init); |
---|
| 89 | +subsys_initcall(sha1_generic_mod_init); |
---|
96 | 90 | module_exit(sha1_generic_mod_fini); |
---|
97 | 91 | |
---|
98 | 92 | MODULE_LICENSE("GPL"); |
---|