-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathamlcblk.h
More file actions
21 lines (18 loc) · 727 Bytes
/
amlcblk.h
File metadata and controls
21 lines (18 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _AMLCBLK_H_
#define _AMLCBLK_H_
/* Amlogic control block description */
struct amlcblk {
size_t blksz; /* Size of one output block */
size_t firstblk; /* Offset of first block */
size_t encsz; /* Size of encrypted payload */
size_t payloadsz; /* Size of decrypted payload */
uint8_t iv[16]; /* AES-256-CBC Initialization vector */
uint8_t aeskey[32]; /* AES-256-CBC key */
uint8_t flag; /* AMLCBLK flags */
};
int gi_amlcblk_init(struct amlcblk *acb, int fd);
int gi_amlcblk_read_hdr(struct amlcblk *acb, int fd);
int gi_amlcblk_dump_hdr(struct amlcblk const *acb, int fd);
int gi_amlcblk_aes_enc(struct amlcblk *acb, int fout, int fin);
int gi_amlcblk_aes_dec(struct amlcblk *acb, int fout, int fin);
#endif