Exemplo n.º 1
0
 def test_sha1_secret(self):
     secret = 'geheim'
     signature = _signature(self.keys)
     outcome = sha1(self.signature % self.data)
     outcome.update(secret)
     outcome = outcome.hexdigest()
     self.assertEquals(_sha1_signature(self.signature, self.data, secret),
                       outcome)
Exemplo n.º 2
0
 def test_sha1(self):
     signature = _signature(self.keys)
     outcome = sha1(self.signature % self.data).hexdigest()
     self.assertEquals(_sha1_signature(self.signature, self.data, ''),
                       outcome)
Exemplo n.º 3
0
 def test_sha1_empty(self):
     outcome = sha1('').hexdigest()
     self.assertEquals(_sha1_signature('', {}, ''), outcome)