MCPcopy Create free account
hub / github.com/ceph/ceph / do_setup_cipher

Method do_setup_cipher

src/client/FSCrypt.cc:593–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591};
592
593bool FSCryptDenc::do_setup_cipher(int enc_mode)
594{
595 auto iter = cipher_opt_map.find(enc_mode);
596 if (iter == cipher_opt_map.end()) {
597 return false;
598 }
599
600 auto& opts = iter->second;
601 if (opts.cts_mode) {
602 init_cipher(EVP_CIPHER_fetch(NULL, opts.str, NULL),
603 { OSSL_PARAM_construct_utf8_string(OSSL_CIPHER_PARAM_CTS_MODE, (char *)"CS3", 0),
604 OSSL_PARAM_construct_end()} );
605 } else {
606 init_cipher(EVP_CIPHER_fetch(NULL, opts.str, NULL), {} );
607 }
608
609 key_size = opts.key_size;
610 iv_size = opts.iv_size;
611
612 return true;
613}
614
615bool FSCryptFNameDenc::setup_cipher()
616{

Callers

nothing calls this directly

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected