]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - security/keys/encrypted.h
1 #ifndef __ENCRYPTED_KEY_H
2 #define __ENCRYPTED_KEY_H
4 #define ENCRYPTED_DEBUG 0
7 static inline void dump_master_key(const u8
*master_key
, size_t master_keylen
)
9 print_hex_dump(KERN_ERR
, "master key: ", DUMP_PREFIX_NONE
, 32, 1,
10 master_key
, master_keylen
, 0);
13 static inline void dump_decrypted_data(struct encrypted_key_payload
*epayload
)
15 print_hex_dump(KERN_ERR
, "decrypted data: ", DUMP_PREFIX_NONE
, 32, 1,
16 epayload
->decrypted_data
,
17 epayload
->decrypted_datalen
, 0);
20 static inline void dump_encrypted_data(struct encrypted_key_payload
*epayload
,
21 unsigned int encrypted_datalen
)
23 print_hex_dump(KERN_ERR
, "encrypted data: ", DUMP_PREFIX_NONE
, 32, 1,
24 epayload
->encrypted_data
, encrypted_datalen
, 0);
27 static inline void dump_hmac(const char *str
, const u8
*digest
,
28 unsigned int hmac_size
)
31 pr_info("encrypted_key: %s", str
);
32 print_hex_dump(KERN_ERR
, "hmac: ", DUMP_PREFIX_NONE
, 32, 1, digest
,
36 static inline void dump_master_key(const u8
*master_key
, size_t master_keylen
)
40 static inline void dump_decrypted_data(struct encrypted_key_payload
*epayload
)
44 static inline void dump_encrypted_data(struct encrypted_key_payload
*epayload
,
45 unsigned int encrypted_datalen
)
49 static inline void dump_hmac(const char *str
, const u8
*digest
,
50 unsigned int hmac_size
)