cryptfs: Don't use bare integers for key size
Rather than use an integer and have a comment, we use a named constant for sizing these master key buffers. This will help avoid confusion when we switch to allowing different sized master keys. Bug: 73079191 Test: Build Change-Id: Ifaffdd94d337bb2d5a178f818dfe00f9386ae03b
This commit is contained in:
parent
c0de9c7dba
commit
00eda38635
1 changed files with 2 additions and 4 deletions
|
@ -1604,8 +1604,7 @@ static int do_crypto_complete(const char *mount_point)
|
|||
static int test_mount_encrypted_fs(struct crypt_mnt_ftr* crypt_ftr,
|
||||
const char *passwd, const char *mount_point, const char *label)
|
||||
{
|
||||
/* Allocate enough space for a 256 bit key, but we may use less */
|
||||
unsigned char decrypted_master_key[32];
|
||||
unsigned char decrypted_master_key[KEY_LEN_BYTES];
|
||||
char crypto_blkdev[MAXPATHLEN];
|
||||
char real_blkdev[MAXPATHLEN];
|
||||
char tmp_mount_point[64];
|
||||
|
@ -1862,8 +1861,7 @@ int cryptfs_check_passwd(const char *passwd)
|
|||
int cryptfs_verify_passwd(const char *passwd)
|
||||
{
|
||||
struct crypt_mnt_ftr crypt_ftr;
|
||||
/* Allocate enough space for a 256 bit key, but we may use less */
|
||||
unsigned char decrypted_master_key[32];
|
||||
unsigned char decrypted_master_key[KEY_LEN_BYTES];
|
||||
char encrypted_state[PROPERTY_VALUE_MAX];
|
||||
int rc;
|
||||
|
||||
|
|
Loading…
Reference in a new issue