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

Method WrapKey

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

Source from the content-addressed store, hash-verified

78}
79
80std::string LocalWrapKmsClient::WrapKey(const SecureString& key_bytes,
81 const std::string& master_key_identifier) {
82 const auto master_key = master_key_cache_.GetOrInsert(
83 master_key_identifier, [this, master_key_identifier]() -> SecureString {
84 return this->GetKeyFromServer(master_key_identifier);
85 });
86 const auto& aad = master_key_identifier;
87
88 const auto encrypted_encoded_key =
89 internal::EncryptKeyLocally(key_bytes, master_key, aad);
90 return LocalKeyWrap::CreateSerialized(encrypted_encoded_key);
91}
92
93SecureString LocalWrapKmsClient::UnwrapKey(const std::string& wrapped_key,
94 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