TestEncryptHelper

class tests.test_crypto.TestEncryptHelper(methodName='runTest')[source]

Test EncryptHelper key generation, encryption, decryption and more

__init__(methodName='runTest')

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

Methods

Methods

test_corrupt_key_encrypt()

Test that encrypt_str fails when using a corrupted key

test_generate_key_enc_dec()

Test EncryptHelper.generate_key() key works for encryption and decryption

test_invalid_key_decrypt()

Test that decrypt_str fails when using the wrong key

test_is_encrypted()

Test that is_encrypted returns True for encrypted data, and False for non-encrypted

test_password_key_diffpass()

Test that password_key returns two different keys for two passwords with the same salt

test_password_key_diffsalt()

Test that password_key returns two different keys for passwords with different salts

test_password_key_equal()

Test that password_key returns the same key when ran with the same arguments

test_password_key_gensalt()

Test that we can reproduce the same key from password_key’s auto-generated salt

Attributes

Attributes

txt