Skip to content

Commit 227ef7e

Browse files
committed
Added CamelliaCipher.IV and changed CamelliaCipher.block_size
1 parent 4e69c1e commit 227ef7e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

camellia/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def new(*args, **kwargs):
146146
block_size = 16
147147

148148
class CamelliaCipher(object):
149-
block_size = 16*8
149+
block_size = 16
150150

151151
def __init__(self, key, **kwargs):
152152
self.__key_length = len(key) * 8
@@ -168,6 +168,8 @@ def __init__(self, key, **kwargs):
168168
if len(self.__IV) != self.block_size/8:
169169
raise ValueError("IV must be 16 bytes long")
170170

171+
self.IV = __IV # self.IV can be changed, but has no effect!
172+
171173
if "counter" in keys:
172174
self.__counter = kwargs["counter"]
173175
elif self.mode == MODE_CTR:

0 commit comments

Comments
 (0)