Skip to content

Commit

Permalink
fix wrong return type annotation in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
donghyeon-kim98 committed Dec 28, 2020
1 parent cd607c7 commit 9d50fd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/src/AesEverywhere/aes256.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def encrypt(raw, passphrase):
@param passphrase: string Passphrase
@type raw: string
@type passphrase: string
@rtype: string
@rtype: bytes
"""
salt = Random.new().read(8)
key, iv = __derive_key_and_iv(passphrase, salt)
Expand Down
4 changes: 4 additions & 0 deletions python/src/tests/test_aes256.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def test_encrypt_decrypt3(self):
dec = aes256.decrypt(enc, passw)
self.assertEqual(u(text), dec, FAIL)

def test_encrypt_return_type(self):
enc_text = aes256.encrypt("Test! @#$%^&*( 😆😵🤡👌 哈罗 こんにちわ Акїў 😺", "pass")
self.assertIsInstance(enc_text, bytes)


if __name__ == '__main__':
unittest.main()
Expand Down

0 comments on commit 9d50fd1

Please sign in to comment.