For the sake of knowledge, I would like to create my own very complex function for encrypting and decrypting program strings.
I got this piece of code from the internet s1[1] := Char((Byte(s1[1]) shl 4) or (Byte(s1[1]) shr 4));
.
It is used to decrypt the string, if I understood correctly what it does is to shift 4 bit left or right and then convert the byte to char. With this statement I tried to reverse the encryption.
I tried to convert each character to ascii / hexa and shift 4 bit right / left with shr
and shl
but the result was never what was expected.
Could Aguem fix or show what the encrypter of this code would look like?