Turns out there is a bug in JRuby. If you call OpenSSL::HMAC.hexdigest(OpenSSL::Digest::SHA256.new, hmac_key, hmac_data) with an empty String hmac_key it blows up with a Segfault.