]> wagner.pp.ru Git - oss/ctypescrypto.git/commitdiff
fix forgotten encrypt=False in the test
authorVictor Wagner <wagner@atlas-card.ru>
Mon, 9 Jun 2014 08:51:36 +0000 (12:51 +0400)
committerVictor Wagner <wagner@atlas-card.ru>
Mon, 9 Jun 2014 08:51:36 +0000 (12:51 +0400)
ctypescrypto/cipher.py
tests/testcipher.py

index 91c5283a659f70767620826ef81ae4fd7e1b33a2..f4a2d47893000cd409833b001ae032ed39333670 100644 (file)
@@ -225,4 +225,4 @@ libcrypto.EVP_CIPHER_nid.argtypes=(c_void_p,)
 libcrypto.EVP_CipherUpdate.argtypes=(c_void_p,c_char_p,POINTER(c_int),c_char_p,c_int)
 libcrypto.EVP_get_cipherbyname.restype=c_void_p
 libcrypto.EVP_get_cipherbyname.argtypes=(c_char_p,)
-
+libcrypto.EVP_CIPHER_CTX_set_key_length.argtypes=(c_void_p,c_int)
index de426cba665f50d988009b7c08f375c065301222..d9857cfeb18cb16e32608b9e7ec9f775dd253f2e 100644 (file)
@@ -84,7 +84,7 @@ class TestEncryptDecrypt(unittest.TestCase):
                c=cipher.new("bf-ofb",encryptkey,iv=iv)
                ciphertext=c.update(data)+c.finish()
                decryptkey=encryptkey[0:5]+encryptkey[5:]
-               d=cipher.new("bf-ofb",decryptkey,iv=iv)
+               d=cipher.new("bf-ofb",decryptkey,encrypt=False,iv=iv)
                deciph=d.update(ciphertext)+d.finish()
                self.assertEqual(deciph,data)
 if __name__ == '__main__':