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

Function ToEncryptionKey

cpp/src/arrow/filesystem/gcsfs_internal.cc:113–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111namespace gcs = ::google::cloud::storage;
112
113Result<gcs::EncryptionKey> ToEncryptionKey(
114 const std::shared_ptr<const KeyValueMetadata>& metadata) {
115 if (!metadata) {
116 return gcs::EncryptionKey{};
117 }
118
119 const auto& keys = metadata->keys();
120 const auto& values = metadata->values();
121
122 for (std::size_t i = 0; i < keys.size(); ++i) {
123 if (keys[i] == "encryptionKeyBase64") {
124 return gcs::EncryptionKey::FromBase64Key(values[i]);
125 }
126 }
127 return gcs::EncryptionKey{};
128}
129
130Result<gcs::KmsKeyName> ToKmsKeyName(
131 const std::shared_ptr<const KeyValueMetadata>& metadata) {

Callers 2

TESTFunction · 0.85
OpenOutputStreamMethod · 0.85

Calls 3

keysMethod · 0.45
valuesMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68