~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/crypto/sha1_glue.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/arm/crypto/sha1_glue.c (Architecture m68k) and /arch/sparc64/crypto/sha1_glue.c (Architecture sparc64)


  1 // SPDX-License-Identifier: GPL-2.0-or-later        1 
  2 /*                                                
  3  * Cryptographic API.                             
  4  * Glue code for the SHA1 Secure Hash Algorith    
  5  *                                                
  6  * This file is based on sha1_generic.c and sh    
  7  *                                                
  8  * Copyright (c) Alan Smithee.                    
  9  * Copyright (c) Andrew McDonald <andrew@mcdon    
 10  * Copyright (c) Jean-Francois Dive <jef@linux    
 11  * Copyright (c) Mathias Krause <minipli@googl    
 12  */                                               
 13                                                   
 14 #include <crypto/internal/hash.h>                 
 15 #include <linux/init.h>                           
 16 #include <linux/module.h>                         
 17 #include <linux/types.h>                          
 18 #include <crypto/sha1.h>                          
 19 #include <crypto/sha1_base.h>                     
 20 #include <asm/byteorder.h>                        
 21                                                   
 22 #include "sha1.h"                                 
 23                                                   
 24 asmlinkage void sha1_block_data_order(struct s    
 25                 const u8 *data, int rounds);      
 26                                                   
 27 int sha1_update_arm(struct shash_desc *desc, c    
 28                     unsigned int len)             
 29 {                                                 
 30         /* make sure signature matches sha1_bl    
 31         BUILD_BUG_ON(offsetof(struct sha1_stat    
 32                                                   
 33         return sha1_base_do_update(desc, data,    
 34 }                                                 
 35 EXPORT_SYMBOL_GPL(sha1_update_arm);               
 36                                                   
 37 static int sha1_final(struct shash_desc *desc,    
 38 {                                                 
 39         sha1_base_do_finalize(desc, sha1_block    
 40         return sha1_base_finish(desc, out);       
 41 }                                                 
 42                                                   
 43 int sha1_finup_arm(struct shash_desc *desc, co    
 44                    unsigned int len, u8 *out)     
 45 {                                                 
 46         sha1_base_do_update(desc, data, len, s    
 47         return sha1_final(desc, out);             
 48 }                                                 
 49 EXPORT_SYMBOL_GPL(sha1_finup_arm);                
 50                                                   
 51 static struct shash_alg alg = {                   
 52         .digestsize     =       SHA1_DIGEST_SI    
 53         .init           =       sha1_base_init    
 54         .update         =       sha1_update_ar    
 55         .final          =       sha1_final,       
 56         .finup          =       sha1_finup_arm    
 57         .descsize       =       sizeof(struct     
 58         .base           =       {                 
 59                 .cra_name       =       "sha1"    
 60                 .cra_driver_name=       "sha1-    
 61                 .cra_priority   =       150,      
 62                 .cra_blocksize  =       SHA1_B    
 63                 .cra_module     =       THIS_M    
 64         }                                         
 65 };                                                
 66                                                   
 67                                                   
 68 static int __init sha1_mod_init(void)             
 69 {                                                 
 70         return crypto_register_shash(&alg);       
 71 }                                                 
 72                                                   
 73                                                   
 74 static void __exit sha1_mod_fini(void)            
 75 {                                                 
 76         crypto_unregister_shash(&alg);            
 77 }                                                 
 78                                                   
 79                                                   
 80 module_init(sha1_mod_init);                       
 81 module_exit(sha1_mod_fini);                       
 82                                                   
 83 MODULE_LICENSE("GPL");                            
 84 MODULE_DESCRIPTION("SHA1 Secure Hash Algorithm    
 85 MODULE_ALIAS_CRYPTO("sha1");                      
 86 MODULE_AUTHOR("David McCullough <ucdevel@gmail    
 87                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php