MCPcopy Create free account
hub / github.com/apache/arrow / WrapKey

Method WrapKey

cpp/src/parquet/encryption/local_wrap_kms_client.cc:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74std::string LocalWrapKmsClient::WrapKey(const SecureString& key_bytes,
75 const std::string& master_key_identifier) {
76 const auto master_key = master_key_cache_.GetOrInsert(
77 master_key_identifier, [this, master_key_identifier]() -> SecureString {
78 return this->GetKeyFromServer(master_key_identifier);
79 });
80 const auto& aad = master_key_identifier;
81
82 const auto encrypted_encoded_key =
83 internal::EncryptKeyLocally(key_bytes, master_key, aad);
84 return LocalKeyWrap::CreateSerialized(encrypted_encoded_key);
85}
86
87SecureString LocalWrapKmsClient::UnwrapKey(const std::string& wrapped_key,
88 const std::string& master_key_identifier) {

Callers

nothing calls this directly

Calls 2

EncryptKeyLocallyFunction · 0.85
GetOrInsertMethod · 0.45

Tested by

no test coverage detected