title: Calculate an RFC 2104-compliant HMAC with the SHA256 hash algorithm in ruby
body: <p>I was going through the Amazon Product Advertising API <a href="http://docs.aws.amazon.com/AWSECommerceService/latest/DG/rest-signature.html#rest_detailedexample" rel="nofollow noreferrer">REST signature docs</a> and I got stuck at #8 </p>
  
  <blockquote>
    <p>Calculate an RFC 2104-compliant HMAC with the SHA256 hash algorithm using the string above with our "dummy" Secret Access Key: 1234567890. For more information about this step, see documentation and code samples for your programming language.</p>
  </blockquote>
  
  <p>Nevermind, managed to get it on one more try with the help of <a href="https://stackoverflow.com/questions/1306550/calculating-a-sha-hash-with-a-string-secret-key-in-python">Calculating a SHA hash with a string + secret key in python</a>. Will post answer below.</p>