Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function Atom128_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "/128GhIoPQROSTeUbADfgHijKLM+n0pFWXY456xyzB7=39VaqrstJklmNuZvwcdEC"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function Atom128_Decode(ByVal input As String) As String
- Dim key As String = "/128GhIoPQROSTeUbADfgHijKLM+n0pFWXY456xyzB7=39VaqrstJklmNuZvwcdEC"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function HAZZ15_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "HNO4klm6ij9n+J2hyf0gzA8uvwDEq3X1Q7ZKeFrWcVTts/MRGYbdxSo=ILaUpPBC5"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function HAZZ15_Decode(ByVal input As String) As String
- Dim key As String = "HNO4klm6ij9n+J2hyf0gzA8uvwDEq3X1Q7ZKeFrWcVTts/MRGYbdxSo=ILaUpPBC5"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function GILA7_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "7ZSTJK+W=cVtBCasyf0gzA8uvwDEq3XH/1RMNOILPQU4klm65YbdeFrx2hij9nopG"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function GILA7_Decode(ByVal input As String) As String
- Dim key As String = "7ZSTJK+W=cVtBCasyf0gzA8uvwDEq3XH/1RMNOILPQU4klm65YbdeFrx2hij9nopG"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function ESAB46_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "ABCDqrs456tuvNOPwxyz012KLM3789=+QRSTUVWXYZabcdefghijklmnopEFGHIJ/"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function ESAB46_Decode(ByVal input As String) As String
- Dim key As String = "ABCDqrs456tuvNOPwxyz012KLM3789=+QRSTUVWXYZabcdefghijklmnopEFGHIJ/"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function MEGAN35_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "3GHIJKLMNOPQRSTUb=cdefghijklmnopWXYZ/12+406789VaqrstuvwxyzABCDEF5"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function MEGAN35_Decode(ByVal input As String) As String
- Dim key As String = "3GHIJKLMNOPQRSTUb=cdefghijklmnopWXYZ/12+406789VaqrstuvwxyzABCDEF5"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function ZONG22_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "ZKj9n+yf0wDVX1s/5YbdxSo=ILaUpPBCHg8uvNO4klm6iJGhQ7eFrWczAMEq3RTt2"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function ZONG22_Decode(ByVal input As String) As String
- Dim key As String = "ZKj9n+yf0wDVX1s/5YbdxSo=ILaUpPBCHg8uvNO4klm6iJGhQ7eFrWczAMEq3RTt2"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function TRIPO5_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "ghijopE+G78lmnIJQRXY=abcS/UVWdefABCs456tDqruvNOPwx2KLyz01M3Hk9ZFT"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function TRIPO5_Decode(ByVal input As String) As String
- Dim key As String = "ghijopE+G78lmnIJQRXY=abcS/UVWdefABCs456tDqruvNOPwx2KLyz01M3Hk9ZFT"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function TIGO3FX_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "FrsxyzA8VtuvwDEqWZ/1+4klm67=cBCa5Ybdef0g2hij9nopMNO3GHIRSTJKLPQUX"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function TIGO3FX_Decode(ByVal input As String) As String
- Dim key As String = "FrsxyzA8VtuvwDEqWZ/1+4klm67=cBCa5Ybdef0g2hij9nopMNO3GHIRSTJKLPQUX"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function FERON74_Encode(ByVal input As String) As String
- input = Uri.EscapeDataString(input)
- Dim key As String = "75XYTabcS/UVWdefADqr6RuvN8PBCsQtwx2KLyz+OM3Hk9ghi01ZFlmnjopE=GIJ4"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs As Integer() = {0, 0, 0}
- For b As Integer = 0 To 2
- If i < input.Length Then chrs(b) = Asc(input(i))
- i += 1
- Next
- enc(0) = chrs(0) >> 2
- enc(1) = ((chrs(0) And 3) << 4) Or (chrs(1) >> 4)
- enc(2) = ((chrs(1) And 15) << 2) Or (chrs(2) >> 6)
- enc(3) = chrs(2) And 63
- If chrs(1) = 0 Then
- enc(2) = 64
- enc(3) = 64
- End If
- If chrs(2) = 0 Then
- enc(3) = 64
- End If
- For Each x As Integer In enc
- out.Append(key(x))
- Next
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function FERON74_Decode(ByVal input As String) As String
- Dim key As String = "75XYTabcS/UVWdefADqr6RuvN8PBCsQtwx2KLyz+OM3Hk9ghi01ZFlmnjopE=GIJ4"
- Dim out As New System.Text.StringBuilder
- Dim i As Integer
- Do
- Dim enc(3) As Integer
- Dim chrs() As Integer = {0, 0, 0}
- For b As Integer = 0 To 3
- enc(b) = key.IndexOf(input(i))
- i = i + 1
- Next
- chrs(0) = (enc(0) << 2) Or (enc(1) >> 4)
- chrs(1) = (enc(1) And 15) << 4 Or (enc(2) >> 2)
- chrs(2) = (enc(2) And 3) << 6 Or enc(3)
- out.Append(Chr(chrs(0)))
- If enc(2) <> 64 Then out.Append(Chr(chrs(1)))
- If enc(3) <> 64 Then out.Append(Chr(chrs(2)))
- Loop While i < input.Length
- Return out.ToString
- End Function
- Public Function ZARA128_Encode(ByVal input As String) As String
- Dim out As New System.Text.StringBuilder
- For Each c As Char In input
- Dim temp As Integer = Asc(c) + 312
- out.Append(temp.ToString & " ")
- Next
- Return out.ToString.Substring(0, out.Length - 1)
- End Function
- Public Function ZARA128_Decode(ByVal input As String) As String
- Dim out As New System.Text.StringBuilder
- Dim data As String() = Split(input, " ")
- For Each s As String In data
- out.Append(Chr(Asc(s) - 312))
- Next
- Return out.ToString
- End Function
- Public Function BASE64_Encode(ByVal input As String) As String
- Return Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(input))
- End Function
- Public Function BASE64_Decode(ByVal input As String) As String
- Return System.Text.Encoding.ASCII.GetString(Convert.FromBase64String(input))
- End Function
- Public Function ARMON64_Encrypt(ByVal message As String, Optional ByVal key As String = "ARMON64-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 3 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- Dim x As Integer
- Do While x < message.Length
- Dim hextemp As String = ""
- Dim y As String = ""
- If x > 0 Then y = "+"
- For i As Integer = x To Math.Round(key.Length / 2)
- If i < message.Length Then hextemp += Hex(Asc(message(i)))
- Next
- Dim thenum As Double = "&H" & hextemp
- If Information.IsNumeric(thenum) = False Then Return message
- For z As Integer = 0 To key.Length - 1
- Dim operation As Integer = z Mod 4
- Select Case operation
- Case 0
- thenum += intkey(z)
- Case 1
- thenum /= intkey(z)
- Case 2
- thenum -= intkey(z)
- Case 3
- thenum *= 0.01 * intkey(z)
- End Select
- Next
- out.Append(y & thenum)
- x += Math.Round(key.Length / 2)
- Loop
- Return out.ToString.Replace(",", ".")
- End Function
- Public Function ARMON64_Decrypt(ByVal message As String, Optional ByVal key As String = "ARMON64-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 6 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- message = message.Replace(".", ",")
- Dim oOutString As String() = Split(message, "+")
- For x As Integer = 0 To oOutString.Length - 1
- For z As Integer = key.Length - 1 To 0 Step -1
- Dim operation As Integer = z Mod 4
- Select Case operation
- Case 0
- oOutString(x) -= intkey(z)
- Case 1
- oOutString(x) *= intkey(z)
- Case 2
- oOutString(x) += intkey(z)
- Case 3
- oOutString(x) /= 0.01 * intkey(z)
- End Select
- Next
- oOutString(x) = Hex(Math.Round(Double.Parse(oOutString(x))))
- Next
- For i As Integer = 0 To Join(oOutString).Length - 1 Step +2
- out.Append(Chr(("&H" & Join(oOutString).Substring(i, 2))))
- Next
- Return out.ToString
- End Function
- Public Function AER256_Encrypt(ByVal message As String, Optional ByVal key As String = "A256-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 10 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- Dim x As Integer
- Do While x < message.Length
- Dim hextemp As String = ""
- Dim y As String = ""
- If x > 0 Then y = ", "
- For i As Integer = x To Math.Round(key.Length / 2)
- If i < message.Length Then hextemp += Hex(Asc(message(i)))
- Next
- Dim thenum As Double = "&H" & hextemp
- If Information.IsNumeric(thenum) = False Then Return message
- For z As Integer = 0 To key.Length - 1
- Dim operation As Integer = z Mod 3
- Select Case operation
- Case 0
- thenum += intkey(z)
- Case 1
- thenum /= intkey(z)
- Case 2
- thenum -= intkey(z)
- Case 3
- thenum *= 0.02 * intkey(z)
- End Select
- Next
- Dim temp As String = thenum.ToString.Replace(",", ".")
- out.Append(y & temp)
- x += Math.Round(key.Length / 2)
- Loop
- Return out.ToString
- End Function
- Public Function AER256_Decrypt(ByVal message As String, Optional ByVal key As String = "A256-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 10 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- Dim oOutString As String() = Split(message, ", ")
- For i As Integer = 0 To oOutString.Length - 1
- oOutString(i) = oOutString(i).Replace(".", ",")
- Next
- For x As Integer = 0 To oOutString.Length - 1
- For z As Integer = key.Length - 1 To 0 Step -1
- Dim operation As Integer = z Mod 3
- Select Case operation
- Case 0
- oOutString(x) -= intkey(z)
- Case 1
- oOutString(x) *= intkey(z)
- Case 2
- oOutString(x) += intkey(z)
- Case 3
- oOutString(x) /= 0.02 * intkey(z)
- End Select
- Next
- oOutString(x) = Hex(Math.Round(Double.Parse(oOutString(x))))
- Next
- For i As Integer = 0 To Join(oOutString).Length - 1 Step +2
- out.Append(Chr(("&H" & Join(oOutString).Substring(i, 2))))
- Next
- Return out.ToString
- End Function
- Public Function EZIP64_Encrypt(ByVal message As String, Optional ByVal key As String = "EZIP64-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 10 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- Dim x As Integer
- Do While x < message.Length
- Dim hextemp As String = ""
- Dim y As String = ""
- If x > 0 Then y = "/"
- For i As Integer = x To Math.Round(key.Length / 3)
- If i < message.Length Then hextemp += Hex(Asc(message(i)))
- Next
- Dim thenum As Double = "&H" & hextemp
- If Information.IsNumeric(thenum) = False Then Return message
- For z As Integer = 0 To key.Length - 1
- Dim operation As Integer = z Mod 4
- Select Case operation
- Case 0
- thenum += intkey(z)
- Case 1
- thenum /= intkey(z)
- Case 2
- thenum -= intkey(z)
- Case 3
- thenum *= 0.02 * intkey(z)
- End Select
- Next
- Dim temp As String = thenum.ToString.Replace(",", ".")
- out.Append(y & temp)
- x += Math.Round(key.Length / 3)
- Loop
- Return out.ToString
- End Function
- Public Function EZIP64_Decrypt(ByVal message As String, Optional ByVal key As String = "EZIP64-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 10 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- Dim oOutString As String() = Split(message, "/")
- For i As Integer = 0 To oOutString.Length - 1
- oOutString(i) = oOutString(i).Replace(".", ",")
- Next
- For x As Integer = 0 To oOutString.Length - 1
- For z As Integer = key.Length - 1 To 0 Step -1
- Dim operation As Integer = z Mod 4
- Select Case operation
- Case 0
- oOutString(x) -= intkey(z)
- Case 1
- oOutString(x) *= intkey(z)
- Case 2
- oOutString(x) += intkey(z)
- Case 3
- oOutString(x) /= 0.02 * intkey(z)
- End Select
- Next
- oOutString(x) = Hex(Math.Round(Double.Parse(oOutString(x))))
- Next
- For i As Integer = 0 To Join(oOutString).Length - 1 Step +2
- out.Append(Chr(("&H" & Join(oOutString).Substring(i, 2))))
- Dim j As String = out.ToString
- Next
- Return out.ToString
- End Function
- Public Function OKTO3_Encrypt(ByVal message As String, Optional ByVal key As String = "PASS:OKTO3-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 10 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- Dim x As Integer
- Do While x < message.Length
- Dim hextemp As String = ""
- Dim y As String = ""
- If x > 0 Then y = ", "
- For i As Integer = x To Math.Round(key.Length / 6)
- If i < message.Length Then hextemp += Hex(Asc(message(i)))
- Next
- Dim thenum As Double = "&H" & hextemp
- If Information.IsNumeric(thenum) = False Then Return message
- For z As Integer = 0 To key.Length - 1
- Dim operation As Integer = z Mod 3
- Select Case operation
- Case 0
- thenum += intkey(z)
- Case 1
- thenum /= intkey(z)
- Case 2
- thenum -= intkey(z)
- Case 3
- thenum *= 500.005 * intkey(z)
- End Select
- Next
- Dim temp As String = thenum.ToString.Replace(",", ".")
- out.Append(y & temp)
- x += Math.Round(key.Length / 6)
- Loop
- Return out.ToString
- End Function
- Public Function OKTO3_Decrypt(ByVal message As String, Optional ByVal key As String = "PASS:OKTO3-CRYPO") As String
- Dim out As New System.Text.StringBuilder
- If key.Length < 10 Then Return message
- Dim intkey() As Byte = System.Text.Encoding.UTF8.GetBytes(key)
- Dim oOutString As String() = Split(message, ", ")
- For i As Integer = 0 To oOutString.Length - 1
- oOutString(i) = oOutString(i).Replace(".", ",")
- Next
- For x As Integer = 0 To oOutString.Length - 1
- For z As Integer = key.Length - 1 To 0 Step -1
- Dim operation As Integer = z Mod 3
- Select Case operation
- Case 0
- oOutString(x) -= intkey(z)
- Case 1
- oOutString(x) *= intkey(z)
- Case 2
- oOutString(x) += intkey(z)
- Case 3
- oOutString(x) /= 0.02 * intkey(z)
- End Select
- Next
- oOutString(x) = Hex(Math.Round(Double.Parse(oOutString(x))))
- Next
- For i As Integer = 0 To Join(oOutString).Length - 1 Step +2
- out.Append(Chr(("&H" & Join(oOutString).Substring(i, 2))))
- Next
- Return out.ToString
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement