Lines Matching refs:options
85 const KeyGeneration makeGen(const CryptoOptions& options) { in makeGen() argument
86 return KeyGeneration{options.cipher.get_keysize(), true, options.use_hw_wrapped_key}; in makeGen()
184 const KeyBuffer& key, const CryptoOptions& options, in create_crypto_blk_dev() argument
192 if (options.use_hw_wrapped_key) { in create_crypto_blk_dev()
208 auto target = std::make_unique<DmTargetDefaultKey>(0, *nr_sec, options.cipher.get_kernel_name(), in create_crypto_blk_dev()
210 if (options.use_legacy_options_format) target->SetUseLegacyOptionsFormat(); in create_crypto_blk_dev()
211 if (options.set_dun) target->SetSetDun(); in create_crypto_blk_dev()
212 if (options.use_hw_wrapped_key) target->SetWrappedKeyV0(); in create_crypto_blk_dev()
247 static bool parse_options(const std::string& options_string, CryptoOptions* options) { in parse_options() argument
254 options->cipher = lookup_cipher(cipher_name); in parse_options()
255 if (options->cipher.get_kernel_name() == nullptr) { in parse_options()
262 options->use_hw_wrapped_key = true; in parse_options()
291 CryptoOptions options; in fscrypt_mount_metadata_encrypted() local
297 options.cipher = legacy_aes_256_xts; in fscrypt_mount_metadata_encrypted()
298 options.use_legacy_options_format = true; in fscrypt_mount_metadata_encrypted()
299 options.set_dun = android::base::GetBoolProperty("ro.crypto.set_dun", false); in fscrypt_mount_metadata_encrypted()
300 if (!options.set_dun && data_rec->fs_mgr_flags.checkpoint_blk) { in fscrypt_mount_metadata_encrypted()
306 if (!parse_options(data_rec->metadata_encryption, &options)) return false; in fscrypt_mount_metadata_encrypted()
312 auto gen = needs_encrypt ? makeGen(options) : neverGen(); in fscrypt_mount_metadata_encrypted()
318 if (!create_crypto_blk_dev(kDmNameUserdata, blk_device, key, options, &crypto_blkdev, &nr_sec)) in fscrypt_mount_metadata_encrypted()
348 static bool get_volume_options(CryptoOptions* options) { in get_volume_options() argument
350 options); in get_volume_options()
354 CryptoOptions options; in defaultkey_volume_keygen() local
355 if (!get_volume_options(&options)) return false; in defaultkey_volume_keygen()
356 *gen = makeGen(options); in defaultkey_volume_keygen()
364 CryptoOptions options; in defaultkey_setup_ext_volume() local
365 if (!get_volume_options(&options)) return false; in defaultkey_setup_ext_volume()
367 return create_crypto_blk_dev(label, blk_device, key, options, out_crypto_blkdev, &nr_sec); in defaultkey_setup_ext_volume()