| 62 | } |
| 63 | |
| 64 | std::shared_ptr<parquet::encryption::CryptoFactory> GetCryptoFactory() { |
| 65 | // Configure KMS. |
| 66 | std::unordered_map<std::string, arrow::util::SecureString> key_map; |
| 67 | key_map.emplace("footerKeyId", arrow::util::SecureString("0123456789012345")); |
| 68 | key_map.emplace("columnKeyId", arrow::util::SecureString("1234567890123456")); |
| 69 | |
| 70 | auto crypto_factory = std::make_shared<parquet::encryption::CryptoFactory>(); |
| 71 | auto kms_client_factory = |
| 72 | // for testing only, do not use it as an example of KmsClientFactory implementation |
| 73 | std::make_shared<parquet::encryption::TestOnlyInMemoryKmsClientFactory>( |
| 74 | /*wrap_locally=*/true, key_map); |
| 75 | crypto_factory->RegisterKmsClientFactory(std::move(kms_client_factory)); |
| 76 | return crypto_factory; |
| 77 | } |
| 78 | |
| 79 | arrow::Status WriteEncryptedFile(const std::string& path_to_file) { |
| 80 | using arrow::internal::checked_pointer_cast; |
no test coverage detected