HiASM
Add(MainForm,2953706,329,203)
{
Width=412
Height=269
}
Add(StreamConvertor,12215568,491,270)
{
Mode=2
link(onResult,7597670:doText,[(537,276)(537,271)])
}
Add(Cryptography,4317299,427,270)
{
Key="Lisnic"
link(onCrypt,12215568:doConvert,[])
link(Data,5523676:Caption,[(433,255)(438,255)])
}
Add(Edit,7597670,550,265)
{
@Hint=#5:codul
Left=45
Top=70
Width=310
Height=35
Font=[MS Sans Serif,12,0,0,1]
Text=""
}
Add(Button,11482074,364,273)
{
Left=155
Top=125
link(onClick,4317299:doCrypt,[(412,279)(412,276)])
}
Add(Label,5523676,432,208)
{
Left=150
Top=20
Width=105
Height=24
Font=[MS Sans Serif,12,0,0,1]
Visible=1
Caption="Vitalicus"
AddHint(49,12,54,13,Caption)
}
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;
?›