Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias -l ABSN return $CALC(($1 * $1) ^ (2 ^ -1))
- alias -l ARCTAN return $CALC($1 / $ABSN($1))
- alias -l TRICK return $ARCTAN($CALC($1 + $ARCTAN($CALC($1 ^ $ARCTAN($1)))))
- alias ENCRYPT return $CALC((($1 * 2) + $TRICK($2)) * (2 ^ $ABSN($2)))
- alias ENCRYPT2 return $CALC((($1 / 2) + $TRICK($2)) / (2 ^ $ABSN($2)))
- alias ENCRYPT_BATCH {
- var %base $1
- tokenize 32 $2-
- var %encrypt_count $0
- var %x 1
- while %x <= %encrypt_count {
- var %current [ $ $+ [ %x ] ]
- var %base $ENCRYPT(%base, %current)
- inc %x
- }
- return %base
- }
- alias DECRYPT {
- var %BASE $1
- var %CURRENT 0
- while $CALC(%BASE % 2) == 0 {
- var %BASE %BASE / 2
- inc %CURRENT
- }
- var %BASE $CALC((%BASE - 1) / 2)
- return %BASE %CURRENT
- }
- alias DECRYPT_BATCH {
- var %BASE $1
- var %COUNT $2
- var %DECRYPTED
- while %COUNT {
- var %CURRENT_TOKEN $DECRYPT(%BASE)
- var %BASE $TOKEN(%CURRENT_TOKEN,1,32)
- var %DECRYPTED $TOKEN(%CURRENT_TOKEN,2,32) %DECRYPTED
- dec %COUNT
- }
- return %BASE %DECRYPTED
- }
Advertisement
Comments
-
- alias ENCRYPT_ASCII {
- var %COUNT $LEN($1-)
- var %x 1
- var %BASE 0
- while %x <= %COUNT {
- var %CURRENT $mid($1-,%x,1)
- var %BASE $ENCRYPT(%BASE,$ASC(%CURRENT))
- inc %x
- }
- return %BASE
- }
- alias DECRYPT_ASCII {
- var %BASE $1
- while %BASE != 0 {
- var %CURRENT_TOKEN $DECRYPT(%BASE)
- var %BASE $TOKEN(%CURRENT_TOKEN,1,32)
- var %CHAR $TOKEN(%CURRENT_TOKEN,2,32)
- if ($BVAR(&STRING,0) > 0) bcopy &STRING 2 &STRING 1 -1
- bset &STRING 1 %CHAR
- }
- return $BVAR(&STRING,1,$BVAR(&STRING,0)).text
- }
Add Comment
Please, Sign In to add comment