title: How to convert an hex string into ascii string in Lua
body: <p>I have no knowledge at all about LUA and I'm trying to craft a small script for nginx.</p>
  
  <p>I'm using the following library (<a href="https://github.com/openresty/lua-resty-string" rel="nofollow">https://github.com/openresty/lua-resty-string</a>) to encrypt some data. Specifically I'm using the code for AES 256 CBC (SHA-512, salted) encryption and storing the hex-encoded encrypted string as shown in the example.</p>
  
  <p>The issue now is that I need to get that hex string back to the decrypt method which expects an ASCII string.</p>
  
  <p>This is an example of the encrypted hex string:</p>
  
  <pre><code>fdbcc47fe5825d49ac3429d4f8408fa4b6528dd99d938f122ee7f00ab71ae0c5c73d29d4f54ea1fbefe706b5dca04f6b6c6b8b96d9807ef58eaba07c6c6cefaf6ad8673b43a4e243fb2912fb4ff93de6488c4795ebb09ecd7a40b7c9dc2003be4ff93425d2d74688208fa4d2a8d22f32490666550f4b01340de708d7aa5bc8468d171da400f59fcff4e7d371d7ab9b48fdfde29aefc0af78b2f934927a7713994c1e8f9435067c851efc5d300405c74d
  </code></pre>