mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-18 16:27:02 +00:00
comment out
I comment out some code lines in the test-section
This commit is contained in:
parent
b25bc2cb30
commit
0e7d4483ca
|
@ -184,26 +184,26 @@ class XORCipher(object):
|
|||
|
||||
|
||||
# Tests
|
||||
crypt = XORCipher()
|
||||
key = 67
|
||||
# crypt = XORCipher()
|
||||
# key = 67
|
||||
|
||||
# test enrcypt
|
||||
print crypt.encrypt("hallo welt",key)
|
||||
# test decrypt
|
||||
print crypt.decrypt(crypt.encrypt("hallo welt",key), key)
|
||||
# # test enrcypt
|
||||
# print crypt.encrypt("hallo welt",key)
|
||||
# # test decrypt
|
||||
# print crypt.decrypt(crypt.encrypt("hallo welt",key), key)
|
||||
|
||||
# test encrypt_string
|
||||
print crypt.encrypt_string("hallo welt",key)
|
||||
# # test encrypt_string
|
||||
# print crypt.encrypt_string("hallo welt",key)
|
||||
|
||||
# test decrypt_string
|
||||
print crypt.decrypt_string(crypt.encrypt_string("hallo welt",key),key)
|
||||
# # test decrypt_string
|
||||
# print crypt.decrypt_string(crypt.encrypt_string("hallo welt",key),key)
|
||||
|
||||
if (crypt.encrypt_file("test.txt",key)):
|
||||
print "encrypt successful"
|
||||
else:
|
||||
print "encrypt unsuccessful"
|
||||
# if (crypt.encrypt_file("test.txt",key)):
|
||||
# print "encrypt successful"
|
||||
# else:
|
||||
# print "encrypt unsuccessful"
|
||||
|
||||
if (crypt.decrypt_file("encrypt.out",key)):
|
||||
print "decrypt successful"
|
||||
else:
|
||||
print "decrypt unsuccessful"
|
||||
# if (crypt.decrypt_file("encrypt.out",key)):
|
||||
# print "decrypt successful"
|
||||
# else:
|
||||
# print "decrypt unsuccessful"
|
Loading…
Reference in New Issue
Block a user