mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-19 00:37: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
|
# Tests
|
||||||
crypt = XORCipher()
|
# crypt = XORCipher()
|
||||||
key = 67
|
# key = 67
|
||||||
|
|
||||||
# test enrcypt
|
# # test enrcypt
|
||||||
print crypt.encrypt("hallo welt",key)
|
# print crypt.encrypt("hallo welt",key)
|
||||||
# test decrypt
|
# # test decrypt
|
||||||
print crypt.decrypt(crypt.encrypt("hallo welt",key), key)
|
# print crypt.decrypt(crypt.encrypt("hallo welt",key), key)
|
||||||
|
|
||||||
# test encrypt_string
|
# # test encrypt_string
|
||||||
print crypt.encrypt_string("hallo welt",key)
|
# print crypt.encrypt_string("hallo welt",key)
|
||||||
|
|
||||||
# test decrypt_string
|
# # test decrypt_string
|
||||||
print crypt.decrypt_string(crypt.encrypt_string("hallo welt",key),key)
|
# print crypt.decrypt_string(crypt.encrypt_string("hallo welt",key),key)
|
||||||
|
|
||||||
if (crypt.encrypt_file("test.txt",key)):
|
# if (crypt.encrypt_file("test.txt",key)):
|
||||||
print "encrypt successful"
|
# print "encrypt successful"
|
||||||
else:
|
# else:
|
||||||
print "encrypt unsuccessful"
|
# print "encrypt unsuccessful"
|
||||||
|
|
||||||
if (crypt.decrypt_file("encrypt.out",key)):
|
# if (crypt.decrypt_file("encrypt.out",key)):
|
||||||
print "decrypt successful"
|
# print "decrypt successful"
|
||||||
else:
|
# else:
|
||||||
print "decrypt unsuccessful"
|
# print "decrypt unsuccessful"
|
Loading…
Reference in New Issue
Block a user