示例#1
0
 def verify(self, data, signature):
     expected = uacrypto.hmac_sha256(self.key, data)
     if signature != expected:
         raise uacrypto.InvalidSignature
示例#2
0
 def signature(self, data):
     return uacrypto.hmac_sha256(self.key, data)