Function report |
Source Code:security\keys\encrypted-keys\encrypted.c |
Create Date:2022-07-28 18:33:47 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rypted_init - initialize an encrypted key* For a new key, use a random number for both the iv and data* itself. For an old key, decrypt the hex encoded data.
Proto:static int encrypted_init(struct encrypted_key_payload *epayload, const char *key_desc, const char *format, const char *master_desc, const char *datalen, const char *hex_encoded_iv)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct encrypted_key_payload * | epayload | |
| const char * | key_desc | |
| const char * | format | |
| const char * | master_desc | |
| const char * | datalen | |
| const char * | hex_encoded_iv |
| 763 | ret = 0 |
| 765 | If format && Not strcmp(format, key_format_ecryptfs) Then |
| 766 | ret = valid_ecryptfs_desc - verify the description of a new/loaded encrypted key* The description of a encrypted key with format 'ecryptfs' must contain* exactly 16 hexadecimal characters. |
| 770 | ecryptfs_fill_auth_tok((structecryptfs_auth_tok * ) payload data + datablob + hmac , key_desc) |
| 774 | __ekey_init(epayload, format, master_desc, datalen) |
| 775 | If Not hex_encoded_iv Then |
| 776 | get_random_bytes( datablob: iv , ivsize) |
| 780 | Else ret = encrypted_key_decrypt(epayload, format, hex_encoded_iv) |
| 782 | Return ret |
| Name | Describe |
|---|---|
| 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. |
| 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 |