def test_signing(self): message = 'hello' key = RSA.load_key_bio(BIO.MemoryBuffer(RSA_KEY)) authenticator = Authenticator() authenticator.rsa_key = key signature = authenticator.sign(message) self.assertEqual(signature, key.sign(message))
def test_signing(self): message = 'hello' key = RSA.load_key_bio(BIO.MemoryBuffer(RSA_KEY)) authenticator = Authenticator() authenticator.rsa_key = key signature = authenticator.sign(message) self.assertEqual(signature, key.sign(message))
def test_signing_not_enabled(self): authenticator = Authenticator() authenticator.enabled = False signature = authenticator.sign('hello') self.assertEqual(signature, '')
def test_signing_not_enabled(self): authenticator = Authenticator() authenticator.enabled = False signature = authenticator.sign('hello') self.assertEqual(signature, '')