alias asc2hex {
var %i = 1, %result
while ($mid($1,%i,1) != $null) {
%result = %result $+ $base($asc($v1),10,16,2)
inc %i
}
return %result
}
alias hex2asc {
var %i = 1, %result
while ($mid($1,%i,2) != $null) {
%result = %result $+ $chr($replace($base($v1,16,10),32,10))
inc %i 2
}
return $replace(%result,$lf,$chr(32))
}