So I have SHA1 varchar sting like 'LQSVPLQSVPSYKLMTY7P5SVPSYN54CMGU' = 32 bytes in database. How do I can convert it to binary sting?
SELECT BINARY('LQSVPLQSVPSYKLMTY7P5SVPSYN54CMGU');
Is not what I looking for. It will be same 32-byte string, but in BLOB. I need get value from sha1 first. Is there any way in Mysql\Postgresql to do it? I also interested in similar MD5 sting conversion. Is there universal way?
This question related to Storing hexadecimal values as binary in MySQL.