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

Method SerializeEncryptedObj

cpp/src/parquet/thrift_internal.h:715–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713 }
714
715 int64_t SerializeEncryptedObj(ArrowOutputStream* out, const uint8_t* out_buffer,
716 uint32_t out_length, Encryptor* encryptor) {
717 auto cipher_buffer =
718 AllocateBuffer(encryptor->pool(), encryptor->CiphertextLength(out_length));
719 std::span<const uint8_t> out_span(out_buffer, out_length);
720 int32_t cipher_buffer_len =
721 encryptor->Encrypt(out_span, cipher_buffer->mutable_span_as<uint8_t>());
722
723 PARQUET_THROW_NOT_OK(out->Write(cipher_buffer->data(), cipher_buffer_len));
724 return static_cast<int64_t>(cipher_buffer_len);
725 }
726
727 std::shared_ptr<ThriftBuffer> mem_buffer_;
728 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