From 71e8ca0d79d8599f1f00d6ec18cb19a2ffabfc8d Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 1 Jan 2014 12:19:47 -0800 Subject: Explanatory comment --- cryptography/hazmat/primitives/ciphers/modes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cryptography/hazmat/primitives/ciphers/modes.py b/cryptography/hazmat/primitives/ciphers/modes.py index 51a1047c..31af5d6e 100644 --- a/cryptography/hazmat/primitives/ciphers/modes.py +++ b/cryptography/hazmat/primitives/ciphers/modes.py @@ -92,9 +92,11 @@ class GCM(object): name = "GCM" def __init__(self, initialization_vector, tag=None): + # len(initialization_vector) must in [1, 2 ** 64), but it's impossible + # to actually construct a bytes object that large, so we don't check + # for it self.initialization_vector = initialization_vector self.tag = tag def validate_for_algorithm(self, algorithm): - # TODO: figure out what this should do pass -- cgit v1.2.3