Home
last modified time | relevance | path

Searched refs:crypt_ftr (Results 1 – 1 of 1) sorted by relevance

/system/vold/
Dcryptfs.cpp341 static void set_ftr_sha(struct crypt_mnt_ftr *crypt_ftr) in set_ftr_sha() argument
345 memset(crypt_ftr->sha256, 0, sizeof(crypt_ftr->sha256)); in set_ftr_sha()
346 SHA256_Update(&c, crypt_ftr, sizeof(*crypt_ftr)); in set_ftr_sha()
347 SHA256_Final(crypt_ftr->sha256, &c); in set_ftr_sha()
353 static int put_crypt_ftr_and_key(struct crypt_mnt_ftr *crypt_ftr) in put_crypt_ftr_and_key() argument
365 set_ftr_sha(crypt_ftr); in put_crypt_ftr_and_key()
386 if ((cnt = write(fd, crypt_ftr, sizeof(struct crypt_mnt_ftr))) != sizeof(struct crypt_mnt_ftr)) { in put_crypt_ftr_and_key()
409 static bool check_ftr_sha(const struct crypt_mnt_ftr *crypt_ftr) in check_ftr_sha() argument
412 memcpy(&copy, crypt_ftr, sizeof(copy)); in check_ftr_sha()
414 return memcmp(copy.sha256, crypt_ftr->sha256, sizeof(copy.sha256)) == 0; in check_ftr_sha()
[all …]