blake2s.c (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) | blake2s.c (f03a3cab26c1b7f628a3be6d33ae1b483829b630) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 OR MIT 2/* 3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 * 5 * This is an implementation of the BLAKE2s hash and PRF functions. 6 * 7 * Information: https://blake2.net/ 8 * --- 59 unchanged lines hidden (view full) --- 68 blake2s_final(&state, i_hash); 69 70 memcpy(out, i_hash, BLAKE2S_HASH_SIZE); 71 memzero_explicit(x_key, BLAKE2S_BLOCK_SIZE); 72 memzero_explicit(i_hash, BLAKE2S_HASH_SIZE); 73} 74EXPORT_SYMBOL(blake2s256_hmac); 75 | 1// SPDX-License-Identifier: GPL-2.0 OR MIT 2/* 3 * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. 4 * 5 * This is an implementation of the BLAKE2s hash and PRF functions. 6 * 7 * Information: https://blake2.net/ 8 * --- 59 unchanged lines hidden (view full) --- 68 blake2s_final(&state, i_hash); 69 70 memcpy(out, i_hash, BLAKE2S_HASH_SIZE); 71 memzero_explicit(x_key, BLAKE2S_BLOCK_SIZE); 72 memzero_explicit(i_hash, BLAKE2S_HASH_SIZE); 73} 74EXPORT_SYMBOL(blake2s256_hmac); 75 |
76static int __init mod_init(void) | 76static int __init blake2s_mod_init(void) |
77{ 78 if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) && 79 WARN_ON(!blake2s_selftest())) 80 return -ENODEV; 81 return 0; 82} 83 | 77{ 78 if (!IS_ENABLED(CONFIG_CRYPTO_MANAGER_DISABLE_TESTS) && 79 WARN_ON(!blake2s_selftest())) 80 return -ENODEV; 81 return 0; 82} 83 |
84static void __exit mod_exit(void) | 84static void __exit blake2s_mod_exit(void) |
85{ 86} 87 | 85{ 86} 87 |
88module_init(mod_init); 89module_exit(mod_exit); | 88module_init(blake2s_mod_init); 89module_exit(blake2s_mod_exit); |
90MODULE_LICENSE("GPL v2"); 91MODULE_DESCRIPTION("BLAKE2s hash function"); 92MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>"); | 90MODULE_LICENSE("GPL v2"); 91MODULE_DESCRIPTION("BLAKE2s hash function"); 92MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>"); |