So recently, I decided to try to create my own encryption system and almost succeeded, but decryption doesn't work as it should. Turns chars other places than they should etc. "stet" comes out of "test" after decryption.

Encryption:
Code:
    Public Shared output As String

    Public Shared Function Encrypt(ByVal text As String) As String
        For Each cc As String In text

            If cc.Contains("A") Then
                output = output + "&X01z"
            End If
            If cc.Contains("B") Then
                output = output + "&X08u"
            End If

        Next
    End function
Decryption:
Code:
    Public Shared outputD As String

    Public Shared Function Decrypt(ByVal textD As String) As String
        For Each WORD As String In textD.Split("")
            If textD.Contains("&X01z") Then
                outputD = outputD + "A"
            End If
            If textD.Contains("&X08u") Then
                outputD = outputD + "B"
            End If
        Next
     End function
I know it may be weird coded and useless but I want only to learn about it.