18
Apr
2005

VB & ASP Functions




'Rot13

Function dec1(dectxt,artieksi)
txtdone = ""
if artieksi = 1 then artieksi = +3 else artieksi = -3
For i = 1 To Len(dectxt)
a = Mid(dectxt, i, 1)
b = Asc(a) + artieksi
Do
If b > 255 Then b = b - 255
Loop Until b <= 255
Do
If b < 1 Then b = b + 255
Loop Until b >= 1
txtdone = txtdone & Chr(b)
Next
dec1 = txtdone
End Function



'Reverse

Function dec2(dectxt)
txtdone = ""
For i = 1 To Len(dectxt)
a = Mid(dectxt, i, 1)
txtdone = a & txtdone
Next
dec2 = txtdone
End Function



'XOR

Function dec3(dectxt,onarka)
txtdone = ""
For i = 1 To Len(dectxt)
a = Mid(dectxt, i, 1)
'if onarka = 0 then xorfakt = i else xorfakt = Len(dectxt)-i
xorfakt = 7
b = Asc(a) Xor xorfakt
Do
If b > 255 Then b = b - 255
Loop Until b <= 255
Do
If b < 1 Then b = b + 255
Loop Until b >= 1
txtdone = txtdone & Chr(b)
Next
dec3 = txtdone
End Function



'Inverse

Function dec4(dectxt)
txtdone = ""
For i = 1 To Len(dectxt)
a = Mid(dectxt, i, 1)
b = 255 - Asc(a)
Do
If b > 255 Then b = b - 255
Loop Until b <= 255
Do
If b < 1 Then b = b + 255
Loop Until b >= 1
txtdone = txtdone & Chr(b)
Next
dec4 = txtdone
End Function
logo

vireas

Suche

 

Aktuelle Beiträge

C i s c o  V...
can get always the latest version of C i s c o  V...
vireas - 12. Jul, 11:07
WM5: Custom text on today...
You can set a small custom text message on the bottom...
vireas - 15. Mai, 21:44
WM5: Increase Performance...
Boost Windows Mobile 5 performance up to 20 percent [HKLM\System\Stor ageManager\FATFS]...
vireas - 15. Mai, 21:42
WM5: Speed Up your Pocket...
This tweak might help improving visual performance...
vireas - 15. Mai, 21:41
Windows Ordner
-Es ist nicht möglich unter Windows einen Ordner anzulegen...
vireas - 22. Feb, 13:37

Archiv

April 2005
Mo
Di
Mi
Do
Fr
Sa
So
 
 
 
 
 1 
 2 
 3 
 4 
 6 
 7 
 8 
 9 
10
11
12
13
14
15
16
21
23
24
25
26
27
29
30
 
 

Status

Online seit 7702 Tagen
Zuletzt aktualisiert: 12. Jul, 11:07
vireas-plug

KnowHow
KnowHow - Mobiles
Tools
Profil
Abmelden
Weblog abonnieren