diff options
author | Simon Warta <[email protected]> | 2017-05-04 01:32:36 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-05-04 01:32:36 +0200 |
commit | b9900ce421a5553d47f79a6e53348871da1ed4f0 (patch) | |
tree | d0dd92874f4dd2bf7a52e4336bb1d331cffcd9c0 /src | |
parent | 6c06b1fe1fea3d333522bf83688de6d34ee94604 (diff) |
Don't use len() to verify emptyness
Diffstat (limited to 'src')
-rwxr-xr-x | src/python/botan2.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/python/botan2.py b/src/python/botan2.py index 6f9d98a3d..6d1ee25fe 100755 --- a/src/python/botan2.py +++ b/src/python/botan2.py @@ -806,7 +806,10 @@ def test(): enc.set_key(key) enc.start(iv) - assert len(enc.update('')) == 0 + + update_result = enc.update('') + assert not update_result + ct = enc.finish(pt) print(" ciphertext %s (%d)" % (hex_encode(ct), len(ct))) |