[api] Add zero-copy support for noise encryption key requests (#12405)

This commit is contained in:
J. Nick Koston
2025-12-20 06:47:30 -10:00
committed by GitHub
parent 64269334ce
commit 40eb898814
7 changed files with 21 additions and 12 deletions
+5 -2
View File
@@ -858,9 +858,12 @@ void SubscribeLogsResponse::calculate_size(ProtoSize &size) const {
#ifdef USE_API_NOISE
bool NoiseEncryptionSetKeyRequest::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
switch (field_id) {
case 1:
this->key = value.as_string();
case 1: {
// Use raw data directly to avoid allocation
this->key = value.data();
this->key_len = value.size();
break;
}
default:
return false;
}