module WxExt::Api::Msg
User
api of weixin.
@author FuShengYang
Public Instance Methods
check_signature(signature, timestamp, nonce, token)
click to toggle source
Check the signature before send msg.
@return [Boolean] Check the signature true or false.
# File lib/wx_ext/api/qrcode.rb, line 17 def check_signature(signature, timestamp, nonce, token) array = [token, timestamp, nonce].sort signature == Digest::SHA1.hexdigest(array.join) ? true : false end