aboutsummaryrefslogtreecommitdiffstats
path: root/docs/development/custom-vectors/idea/verify_idea.py
diff options
context:
space:
mode:
Diffstat (limited to 'docs/development/custom-vectors/idea/verify_idea.py')
-rw-r--r--docs/development/custom-vectors/idea/verify_idea.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/development/custom-vectors/idea/verify_idea.py b/docs/development/custom-vectors/idea/verify_idea.py
index 692cc76e..f7e22763 100644
--- a/docs/development/custom-vectors/idea/verify_idea.py
+++ b/docs/development/custom-vectors/idea/verify_idea.py
@@ -17,7 +17,9 @@ def encrypt(mode, key, iv, plaintext):
def verify_vectors(mode, filename):
- vector_file = open(filename, "r")
+ with open(filename, "r") as f:
+ vector_file = f.read()
+
vectors = load_nist_vectors(vector_file)
for vector in vectors:
ct = encrypt(