Ruby’s Array#pack converts array elements into a string according to a format directive. With "C*", it treats every element as an unsigned character value and packs all of them into one string—the practical equivalent of converting each value to a character and joining the results. section 10.11.3
Rebuilding a string from XOR-ed bytes
An XOR routine maps over a string’s bytes, XORs each byte with the next byte from a cycling key enumerator, and finishes with .pack("C*"). Applying the same operation twice reconstructs the original string. section 10.11.3
