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

Function BuildKeyMap

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

Source from the content-addressed store, hash-verified

50}
51
52std::unordered_map<std::string, SecureString> BuildKeyMap(const char* const* column_ids,
53 const char* const* column_keys,
54 const char* footer_id,
55 const char* footer_key) {
56 std::unordered_map<std::string, SecureString> key_map;
57 // add column keys
58 for (int i = 0; i < 6; i++) {
59 // this is not safe to do as column_keys[i] is not protected by SecureString
60 // do not do outside test code
61 key_map.insert({column_ids[i], SecureString(column_keys[i])});
62 }
63 // add footer key
64 // this is not safe to do as footer_key[i] is not protected by SecureString
65 // do not do outside test code
66 key_map.insert({footer_id, SecureString(footer_key)});
67
68 return key_map;
69}
70
71std::string BuildColumnKeyMapping() {
72 std::ostringstream stream;

Callers 2

SetUpMethod · 0.85
SetUpMethod · 0.85

Calls 2

SecureStringFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected