title: How to Convert SHA1 and MD5 text-values to binary? (sql)
body: <p>So I have SHA1 varchar sting like 'LQSVPLQSVPSYKLMTY7P5SVPSYN54CMGU' = 32 bytes in database. How do I can convert it to binary sting? </p>
  
  <pre><code>SELECT BINARY('LQSVPLQSVPSYKLMTY7P5SVPSYN54CMGU'); 
  </code></pre>
  
  <p>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?</p>
  
  <p>This question related to <a href="https://stackoverflow.com/questions/1712934/storing-hexadecimal-values-as-binary-in-mysql">Storing hexadecimal values as binary in MySQL</a>.</p>