@verb #8084:"encryptB" this none this rxdo #8084 @program #8084:"encryptB" this none this {string, key} = args if (key > 65536) raise(E_INVARG, "16 bit key only.") elseif (key < 0) raise(E_INVARG, "key < 0 not allowed") endif data = decode_binary(string, 1) while (length(data) % 4) data = {@data, 0} endwhile out = {} for x in [1..length(data) / 2] one = $math_utils:BLFromInt(data[x * 2]) two = $math_utils:BLFromInt(data[x * 2 + 1]) one = one[$ - 15..$] two = two[$ - 15..$] #8084:tell(toliteral(one), " (", length(one), ")") z = $math_utils:IntFromBL({@two, @one}) z = $math_utils:xor(z, key) xored = $math_utils:BLFromInt(z) player:tell(toliteral(xored)) out = {$math_utils:IntFromBL(xored[1..8]), $math_utils:intfrombl(xored[9..16]), @out} $command_utils:suspend_if_needed(0) endfor "player:tell(toliteral(out));" return encode_binary(out) "Last modified by Lao-Tzu (#8084) on Fri Nov 10 11:25:14 2000 MST." .