Module: WxExt::Api::Msg
Overview
User api of weixin.
Instance Method Summary collapse
-
#check_signature(signature, timestamp, nonce, token) ⇒ Boolean
Check the signature before send msg.
Instance Method Details
#check_signature(signature, timestamp, nonce, token) ⇒ Boolean
Check the signature before send msg.
17 18 19 20 |
# File 'lib/wx_ext/api/qrcode.rb', line 17 def check_signature(signature, , nonce, token) array = [token, , nonce].sort signature == Digest::SHA1.hexdigest(array.join) ? true : false end |