MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / readNonce

Function readNonce

src/Compression/CompressionCodecEncrypted.cpp:291–306  ·  view source on GitHub ↗

Firstly, read a byte, which shows if the nonce will be put in text (if it was defined in config) Secondly, read nonce in text (this step depends from first step) return new position to read

Source from the content-addressed store, hash-verified

289/// Secondly, read nonce in text (this step depends from first step)
290/// return new position to read
291inline const char * readNonce(String & nonce, const char * source)
292{
293 /// If first is zero byte: move source and set zero-bytes nonce
294 if (!*source)
295 {
296 nonce = empty_nonce;
297 return ++source;
298 }
299 /// Move to next byte. Nonce will begin from there
300 ++source;
301
302 /// Otherwise, use data from source in nonce
303 nonce = {source, actual_nonce_size};
304 source += actual_nonce_size;
305 return source;
306}
307
308}
309

Callers 1

doDecompressDataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected