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
| 289 | /// Secondly, read nonce in text (this step depends from first step) |
| 290 | /// return new position to read |
| 291 | inline 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 |