OHHH! i typed a message then it dawned on me what you were saying xD
I'd make something using a bitwise manipulation functions. Basically, put all your data into an array of bytes. Now, a byte is 8 bits long, and the least common multiple of 8 and 6 is 24. (8*3=6*4) So if you have 4 6 bit numbers and 3 8 bit numbers, that looks something like this in binary:
AAAAAAAA BBBBBBBB CCCCCCCC
AAAAAABB BBBBCCCC CCDDDDDD
(where A/B/C/D are bits of different numbers)
So, I'd do something like this (DBPro style pseudo-code, I'm using the post-message form as an editor here and not testing it in DBPro, but I'll try to use proper syntax xD)
dim myarr(-1) as byte
global output_ascii_string as string
function getCharacterFrom64(arg as integer)
`you implement this:
`where arg is on the range [0,63], return a single character
`representing that base 64 number.
endfunction ""
function parse_6bit_from_array_to_string()
currentpos=0
`3 bytes per 4 characters, so make sure it has an array size that is a multiple of 3.
while ((array count(myarr())+1) mod 3)>0
addByteToArray(0)
endwhile
maxsize=array count(myarr())
output_ascii_string=""
b1 as integer
b2 as integer
b3 as integer `because DBPro has to convert bytes to integers
`when (always?) they are used in a mathematical expression,
`I'm using integers. Pretend they're bytes, k?
`actually, these will only store numbers inbetween 0 and 63,
`so pretend they're two bits less than a byte
repeat
b1=myarr(currentpos)&%00111111
b2=(myarr(currentpos)&%11000000)>>6 : inc currentpos
b2=b2|((myarr(currentpos)&%00001111)<<2)
b3=myarr(currentpos)&%11110000 : inc currentpos
b3=b3|((myarr(currentpos)&%00000011)<<4)
b4=(myarr(currentpos)&%11111100)>>2 : inc currentpos
output_ascii_string=output_ascii_string+getCharacterFrom64(b1)
output_ascii_string=output_ascii_string+getCharacterFrom64(b2)
output_ascii_string=output_ascii_string+getCharacterFrom64(b3)
output_ascii_string=output_ascii_string+getCharacterFrom64(b4)
if currentpos>maxsize then exit
until 1
undim myarr()
dim myarr(-1) as byte
endfunction
function addByteToArray(n as byte)
array insert at bottom myarr()
myarr(array count(myarr()))=n
endfunction
function addIntegerToArray(n as integer)
array insert at bottom myarr()
myarr(array count(myarr()))=n&0xFF
array insert at bottom myarr()
myarr(array count(myarr()))=(n&0xFF00)>>8
array insert at bottom myarr()
myarr(array count(myarr()))=(n&0xFF0000)>>16
array insert at bottom myarr()
myarr(array count(myarr()))=(n&0xFF000000)>>24
endfunction
That should work. Then you could parse the string back into a byte array, then the byte array back into meaningful data structures.
[edit]
Hmm... I think all those | symbols need to be replaced by ||, and & with &&.
[edit2]
alright I got to thinking about how to do this well, and I think I'm going to make a bunch of base64 string/datatype conversion functions. Also, I don't think "encryption" is the right word. It's more just changing format.

Why does blue text appear every time you are near?