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

Method SerializeEncryptedObj

cpp/src/parquet/thrift_internal.h:689–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687 }
688
689 int64_t SerializeEncryptedObj(ArrowOutputStream* out, const uint8_t* out_buffer,
690 uint32_t out_length, Encryptor* encryptor) {
691 auto cipher_buffer =
692 AllocateBuffer(encryptor->pool(), encryptor->CiphertextLength(out_length));
693 std::span<const uint8_t> out_span(out_buffer, out_length);
694 int32_t cipher_buffer_len =
695 encryptor->Encrypt(out_span, cipher_buffer->mutable_span_as<uint8_t>());
696
697 PARQUET_THROW_NOT_OK(out->Write(cipher_buffer->data(), cipher_buffer_len));
698 return static_cast<int64_t>(cipher_buffer_len);
699 }
700
701 std::shared_ptr<ThriftBuffer> mem_buffer_;
702 std::shared_ptr<apache::thrift::protocol::TProtocol> protocol_;

Callers

nothing calls this directly

Calls 6

AllocateBufferFunction · 0.70
poolMethod · 0.45
CiphertextLengthMethod · 0.45
EncryptMethod · 0.45
WriteMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected