PHP
‹?php
function xor_string($string, $key) {
for($i = 0; $i ‹ strlen($string); $i++)
$string[$i] = ($string[$i] ^ $key[$i % strlen($key)]);
return $string;
}
$encode=xor_string("Vitalicus","Lisnic");
$code=bin2hex($encode);
echo $code;
?›
Hiasm
Add(MainForm,2953706,343,133)
{
Width=467
Height=403
}
Add(Label,69371,427,161)
{
Left=210
Top=40
Caption="Vitalicus"
}
Add(Cryptography,4346111,427,224)
{
Key="Lisnic"
link(onCrypt,12215568:doConvert,[(468,230)(468,227)])
link(Data,69371:Caption,[])
}
Add(Button,5708773,350,224)
{
Left=210
Top=190
link(onClick,4346111:doCrypt,[])
}
Add(StreamConvertor,12215568,484,221)
{
Mode=2
link(onResult,13952646:doText,[(542,227)(542,223)])
}
Add(Edit,13952646,567,217)
{
Left=95
Top=115
Width=290
Height=35
}