Все знают про шестнадцатеричное кодирование (hex):
select hex('hello');
-- 68656C6C6F
select unhex('68656C6C6F');
-- helloНо есть и другие способы.
Base32:
select encode('hello', 'base32');
-- NBSWY3DP
select decode('NBSWY3DP', 'base32');
-- helloBase64:
select encode('hello', 'base64');
-- aGVsbG8=
select decode('aGVsbG8=', 'base64');
-- helloBase85:
select encode('hello', 'base85');
-- BOu!rDZ
select decode('BOu!rDZ', 'base85');
-- helloURL-кодирование:
select encode('hel lo!', 'url');
-- hel%20lo%21
select decode('hel%20lo%21', 'url');
-- hel lo!
И все они теперь доступны в SQLite с помощью расширения crypto.