hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/crypto/sha1_generic.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Cryptographic API.
34 *
....@@ -9,18 +10,11 @@
910 * Copyright (c) Alan Smithee.
1011 * Copyright (c) Andrew McDonald <andrew@mcdonald.org.uk>
1112 * 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
- *
1813 */
1914 #include <crypto/internal/hash.h>
2015 #include <linux/init.h>
2116 #include <linux/module.h>
2217 #include <linux/mm.h>
23
-#include <linux/cryptohash.h>
2418 #include <linux/types.h>
2519 #include <crypto/sha.h>
2620 #include <crypto/sha1_base.h>
....@@ -36,10 +30,10 @@
3630 static void sha1_generic_block_fn(struct sha1_state *sst, u8 const *src,
3731 int blocks)
3832 {
39
- u32 temp[SHA_WORKSPACE_WORDS];
33
+ u32 temp[SHA1_WORKSPACE_WORDS];
4034
4135 while (blocks--) {
42
- sha_transform(sst->state, src, temp);
36
+ sha1_transform(sst->state, src, temp);
4337 src += SHA1_BLOCK_SIZE;
4438 }
4539 memzero_explicit(temp, sizeof(temp));
....@@ -92,7 +86,7 @@
9286 crypto_unregister_shash(&alg);
9387 }
9488
95
-module_init(sha1_generic_mod_init);
89
+subsys_initcall(sha1_generic_mod_init);
9690 module_exit(sha1_generic_mod_fini);
9791
9892 MODULE_LICENSE("GPL");