Function report |
Source Code:fs\verity\hash_algs.c |
Create Date:2022-07-28 20:24:38 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:sverity_prepare_hash_state() - precompute the initial hash state*@alg: hash algorithm*@salt: a salt which is to be prepended to all data to be hashed*@salt_size: salt size in bytes, possibly 0* Return: NULL if the salt is empty, otherwise the kmalloc()'ed
Proto:const u8 *fsverity_prepare_hash_state(const struct fsverity_hash_alg *alg, const u8 *salt, size_t salt_size)
Type:u8
Parameter:
| Type | Parameter | Name |
|---|---|---|
| const struct fsverity_hash_alg * | alg | |
| const u8 * | salt | |
| size_t | salt_size |
| 108 | struct ahash_request * req = NULL |
| 109 | u8 * padded_salt = NULL |
| 115 | If salt_size == 0 Then Return NULL |
| 118 | hashstate = Allocation memory |
| 123 | If Not req Then |
| 136 | padded_salt = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 137 | If Not padded_salt Then |
| 141 | memcpy(padded_salt, salt, salt_size) |
| 153 | err = crypto_wait_req(rypto_ahash_update() - add data to message digest for processing*@req: ahash_request handle that was previously initialized with the* crypto_ahash_init call, & wait) |
| 160 | out : |
| 162 | kfree(padded_salt) |
| 163 | Return hashstate |
| 165 | err_free : |
| 168 | Go to out |
| Name | Describe |
|---|---|
| fsverity_init_merkle_tree_params | sverity_init_merkle_tree_params() - initialize Merkle tree parameters*@params: the parameters struct to initialize*@inode: the inode for which the Merkle tree is being built*@hash_algorithm: number of hash algorithm to use*@log_blocksize: log base 2 of |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |