162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Hash Info: Hash algorithms information 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2013 Dmitry Kasatkin <d.kasatkin@samsung.com> 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#include <linux/export.h> 962306a36Sopenharmony_ci#include <crypto/hash_info.h> 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ciconst char *const hash_algo_name[HASH_ALGO__LAST] = { 1262306a36Sopenharmony_ci [HASH_ALGO_MD4] = "md4", 1362306a36Sopenharmony_ci [HASH_ALGO_MD5] = "md5", 1462306a36Sopenharmony_ci [HASH_ALGO_SHA1] = "sha1", 1562306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_160] = "rmd160", 1662306a36Sopenharmony_ci [HASH_ALGO_SHA256] = "sha256", 1762306a36Sopenharmony_ci [HASH_ALGO_SHA384] = "sha384", 1862306a36Sopenharmony_ci [HASH_ALGO_SHA512] = "sha512", 1962306a36Sopenharmony_ci [HASH_ALGO_SHA224] = "sha224", 2062306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_128] = "rmd128", 2162306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_256] = "rmd256", 2262306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_320] = "rmd320", 2362306a36Sopenharmony_ci [HASH_ALGO_WP_256] = "wp256", 2462306a36Sopenharmony_ci [HASH_ALGO_WP_384] = "wp384", 2562306a36Sopenharmony_ci [HASH_ALGO_WP_512] = "wp512", 2662306a36Sopenharmony_ci [HASH_ALGO_TGR_128] = "tgr128", 2762306a36Sopenharmony_ci [HASH_ALGO_TGR_160] = "tgr160", 2862306a36Sopenharmony_ci [HASH_ALGO_TGR_192] = "tgr192", 2962306a36Sopenharmony_ci [HASH_ALGO_SM3_256] = "sm3", 3062306a36Sopenharmony_ci [HASH_ALGO_STREEBOG_256] = "streebog256", 3162306a36Sopenharmony_ci [HASH_ALGO_STREEBOG_512] = "streebog512", 3262306a36Sopenharmony_ci}; 3362306a36Sopenharmony_ciEXPORT_SYMBOL_GPL(hash_algo_name); 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciconst int hash_digest_size[HASH_ALGO__LAST] = { 3662306a36Sopenharmony_ci [HASH_ALGO_MD4] = MD5_DIGEST_SIZE, 3762306a36Sopenharmony_ci [HASH_ALGO_MD5] = MD5_DIGEST_SIZE, 3862306a36Sopenharmony_ci [HASH_ALGO_SHA1] = SHA1_DIGEST_SIZE, 3962306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_160] = RMD160_DIGEST_SIZE, 4062306a36Sopenharmony_ci [HASH_ALGO_SHA256] = SHA256_DIGEST_SIZE, 4162306a36Sopenharmony_ci [HASH_ALGO_SHA384] = SHA384_DIGEST_SIZE, 4262306a36Sopenharmony_ci [HASH_ALGO_SHA512] = SHA512_DIGEST_SIZE, 4362306a36Sopenharmony_ci [HASH_ALGO_SHA224] = SHA224_DIGEST_SIZE, 4462306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_128] = RMD128_DIGEST_SIZE, 4562306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_256] = RMD256_DIGEST_SIZE, 4662306a36Sopenharmony_ci [HASH_ALGO_RIPE_MD_320] = RMD320_DIGEST_SIZE, 4762306a36Sopenharmony_ci [HASH_ALGO_WP_256] = WP256_DIGEST_SIZE, 4862306a36Sopenharmony_ci [HASH_ALGO_WP_384] = WP384_DIGEST_SIZE, 4962306a36Sopenharmony_ci [HASH_ALGO_WP_512] = WP512_DIGEST_SIZE, 5062306a36Sopenharmony_ci [HASH_ALGO_TGR_128] = TGR128_DIGEST_SIZE, 5162306a36Sopenharmony_ci [HASH_ALGO_TGR_160] = TGR160_DIGEST_SIZE, 5262306a36Sopenharmony_ci [HASH_ALGO_TGR_192] = TGR192_DIGEST_SIZE, 5362306a36Sopenharmony_ci [HASH_ALGO_SM3_256] = SM3256_DIGEST_SIZE, 5462306a36Sopenharmony_ci [HASH_ALGO_STREEBOG_256] = STREEBOG256_DIGEST_SIZE, 5562306a36Sopenharmony_ci [HASH_ALGO_STREEBOG_512] = STREEBOG512_DIGEST_SIZE, 5662306a36Sopenharmony_ci}; 5762306a36Sopenharmony_ciEXPORT_SYMBOL_GPL(hash_digest_size); 58