I hereby claim:
- I am alduethadyn on github.
- I am abeckwith (https://keybase.io/abeckwith) on keybase.
- I have a public key whose fingerprint is A7F0 074B 04F6 5CE0 72E1 2D15 FF67 FA4E F6D0 472B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class Product < ActiveRecord::Base | |
attr_accessible :data, :sku | |
serialize :data, JSON | |
def data=(data) | |
write_attribute :data, data | |
return unless data? | |
self.primary_high_res_url = high_res | |
end |
require 'openssl' | |
require 'Base64' | |
key = 'API_KEY' | |
secret = 'SHARED_SECRET' | |
message = "#{key}#{secret}#{Time.now().to_i}" | |
sig = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), secret, message) | |
puts sig |