函数逻辑报告 |
Source Code:security\keys\encrypted-keys\encrypted.c |
Create Date:2022-07-27 20:07:33 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Allocate memory for decrypted key and datablob.
函数原型:static struct encrypted_key_payload *encrypted_key_alloc(struct key *key, const char *format, const char *master_desc, const char *datalen)
返回类型:struct encrypted_key_payload
参数:
类型 | 参数 | 名称 |
---|---|---|
struct key * | key | |
const char * | format | |
const char * | master_desc | |
const char * | datalen |
612 | struct encrypted_key_payload * epayload = NULL |
622 | 如果ret小于0或dlen小于MIN_DATA_SIZE或dlen大于MAX_DATA_SIZE则返回:错误号 |
625 | format_len等于如果非format则strlen - Find the length of a string*@s: The string to be sized否则strlen - Find the length of a string*@s: The string to be sized |
626 | decrypted_datalen等于dlen |
628 | 如果format则 |
629 | 如果非字符串比较则 |
630 | 如果dlen不等于ECRYPTFS_MAX_KEY_BYTES则 |
631 | 打印错误信息("encrypted_key: keylen for the ecryptfs format must be equal to %d bytes\n", ECRYPTFS_MAX_KEY_BYTES) |
633 | 返回:错误号 |
636 | payload_datalen等于sizeof(structecryptfs_auth_tok) |
637 | 否则如果非字符串比较则 |
638 | 如果decrypted_datalen不等于KEY_ENC32_PAYLOAD_LEN则 |
639 | 打印错误信息("encrypted_key: enc32 key payload incorrect length: %d\n", decrypted_datalen) |
641 | 返回:错误号 |
648 | datablob_len等于format_len加1加strlen - Find the length of a string*@s: The string to be sized加1加strlen - Find the length of a string*@s: The string to be sized加1加ivsize加1加encrypted_datalen |
651 | ret等于key_payload_reserve - Adjust data quota reservation for the key's payload*@key: The key to make the reservation for |
664 | 返回:epayload |
名称 | 描述 |
---|---|
encrypted_instantiate | rypted_instantiate - instantiate an encrypted key* Decrypt an existing encrypted datablob or create a new encrypted key* based on a kernel random number.* On success, return 0. Otherwise return errno. |
encrypted_update | rypted_update - update the master key description* Change the master key description for an existing encrypted key.* The next read will return an encrypted datablob using the new* master key description.* On success, return 0. Otherwise return errno. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |