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

Method WrapKey

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

Source from the content-addressed store, hash-verified

67}
68
69std::string TestOnlyInServerWrapKms::WrapKey(const SecureString& key_bytes,
70 const std::string& master_key_identifier) {
71 // Always use the latest key version for writing
72 if (wrapping_master_key_map_.find(master_key_identifier) ==
73 wrapping_master_key_map_.end()) {
74 throw ParquetException("Key not found: " + master_key_identifier);
75 }
76 const SecureString& master_key = wrapping_master_key_map_.at(master_key_identifier);
77
78 std::string aad = master_key_identifier;
79 return internal::EncryptKeyLocally(key_bytes, master_key, aad);
80}
81
82SecureString TestOnlyInServerWrapKms::UnwrapKey(
83 const std::string& wrapped_key, const std::string& master_key_identifier) {

Callers 2

Calls 4

ParquetExceptionFunction · 0.85
EncryptKeyLocallyFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected