Lines Matching refs:nokey_name
375 struct fscrypt_nokey_name nokey_name; in fscrypt_fname_disk_to_usr() local
401 nokey_name.dirhash[0] = hash; in fscrypt_fname_disk_to_usr()
402 nokey_name.dirhash[1] = minor_hash; in fscrypt_fname_disk_to_usr()
404 if (iname->len <= sizeof(nokey_name.bytes)) { in fscrypt_fname_disk_to_usr()
405 memcpy(nokey_name.bytes, iname->name, iname->len); in fscrypt_fname_disk_to_usr()
408 memcpy(nokey_name.bytes, iname->name, sizeof(nokey_name.bytes)); in fscrypt_fname_disk_to_usr()
410 sha256(&iname->name[sizeof(nokey_name.bytes)], in fscrypt_fname_disk_to_usr()
411 iname->len - sizeof(nokey_name.bytes), in fscrypt_fname_disk_to_usr()
412 nokey_name.sha256); in fscrypt_fname_disk_to_usr()
415 oname->len = fscrypt_base64url_encode((const u8 *)&nokey_name, size, in fscrypt_fname_disk_to_usr()
447 struct fscrypt_nokey_name *nokey_name; in fscrypt_setup_filename() local
505 nokey_name = (void *)fname->crypto_buf.name; in fscrypt_setup_filename()
506 fname->hash = nokey_name->dirhash[0]; in fscrypt_setup_filename()
507 fname->minor_hash = nokey_name->dirhash[1]; in fscrypt_setup_filename()
510 fname->disk_name.name = nokey_name->bytes; in fscrypt_setup_filename()
539 const struct fscrypt_nokey_name *nokey_name = in fscrypt_match_name() local
548 if (de_name_len <= sizeof(nokey_name->bytes)) in fscrypt_match_name()
550 if (memcmp(de_name, nokey_name->bytes, sizeof(nokey_name->bytes))) in fscrypt_match_name()
552 sha256(&de_name[sizeof(nokey_name->bytes)], in fscrypt_match_name()
553 de_name_len - sizeof(nokey_name->bytes), digest); in fscrypt_match_name()
554 return !memcmp(digest, nokey_name->sha256, sizeof(digest)); in fscrypt_match_name()