Skip to content
lsl.devlsl.devLSL Dev

LlXorBase64StringsCorrect

Wiki description

Correctly performs an exclusive or on two Base 64 strings.

Function notes

str2 repeats if it is shorter than str1. If the inputs are not Base64 strings the result will be erratic.

Return value notes

Returns a string that is a Base64 XOR of str1 and str2.

Caveats

  • During the conversion to a byte array the last (bitcount % 8) are discarded from both str1 and str2. See Implementation for details.
  • Considers any null encountered in str2 to mark the end of str2.

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:Issues/SVC-289

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-289|[[llXorBase64StringsCorrect]] zero out last <code>(bitcount % 8)</code> bits of data.|type=bug|resolution=expect}}

Template:Issues/SCR-35

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SCR-35|[[llXorBase64StringsCorrect]] returns wrong result when the 2nd string contains nulls|type=bug|resolution=fixed|fc={{{fc|}}}}}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.