- alias hexa {
- ; Initialisation boucle
- set %txttc $strip($1-)
- set %lent $len(%txttc)
- set %count 0
- set %crypt $null
-
- ; Debut boucle
- :gcloop
- inc %count
- set %tch $mid(%txttc,%count,1)
- set %crypt %crypt $base($asc(%tch),10,16)
- if ( %count < %lent ) goto gcloop
- set %hexresult $lower(%crypt)
- }
-
- alias stdc {
- ; Initialisation boucle
- set %txttc $strip($1-)
- set %lent $len(%txttc)
- set %count 0
- set %dcrypt $null
-
- :gcloop
- set %tnb $mid(%txttc,%count,3)
- set %tdc $base(%tnb,16,10)
- set %tch $chr(%tdc)
- if ( %tdc == 32 ) set %tch -
- set %dcrypt %dcrypt $+ %tch
- inc %count
- inc %count
- inc %count
- if ( %count < %lent ) goto gcloop
- set %stdresult %dcrypt
- }
-
- alias mx {
- hexa $1-
- msg $chan %hexresult
- }
-
- alias dc {
- stdc $1-
- msg $chan %stdresult
- }
-
- alias mxl {
- hexa $1-
- echo -a %hexresult
- }
-
- alias dcl {
- stdc $1-
- echo -a %stdresult
- }
alias hexa {
; Initialisation boucle
set %txttc $strip($1-)
set %lent $len(%txttc)
set %count 0
set %crypt $null
; Debut boucle
:gcloop
inc %count
set %tch $mid(%txttc,%count,1)
set %crypt %crypt $base($asc(%tch),10,16)
if ( %count < %lent ) goto gcloop
set %hexresult $lower(%crypt)
}
alias stdc {
; Initialisation boucle
set %txttc $strip($1-)
set %lent $len(%txttc)
set %count 0
set %dcrypt $null
:gcloop
set %tnb $mid(%txttc,%count,3)
set %tdc $base(%tnb,16,10)
set %tch $chr(%tdc)
if ( %tdc == 32 ) set %tch -
set %dcrypt %dcrypt $+ %tch
inc %count
inc %count
inc %count
if ( %count < %lent ) goto gcloop
set %stdresult %dcrypt
}
alias mx {
hexa $1-
msg $chan %hexresult
}
alias dc {
stdc $1-
msg $chan %stdresult
}
alias mxl {
hexa $1-
echo -a %hexresult
}
alias dcl {
stdc $1-
echo -a %stdresult
}