PicoHSM always returns bytes().

No need for casting.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-03-20 20:07:33 +01:00
parent 9f0316aedd
commit 18bcf532e7
13 changed files with 45 additions and 45 deletions

View File

@@ -43,11 +43,11 @@ def test_cipher_aes_cipher(device, size):
encryptor = cipher.encryptor()
ctA = encryptor.update(MESSAGE) + encryptor.finalize()
ctB = device.cipher(Algorithm.ALGO_AES_CBC_ENCRYPT, keyid, MESSAGE)
assert(bytes(ctB) == ctA)
assert(ctB == ctA)
decryptor = cipher.decryptor()
plA = decryptor.update(ctA) + decryptor.finalize()
plB = device.cipher(Algorithm.ALGO_AES_CBC_DECRYPT, keyid, ctA)
device.delete_file(DOPrefixes.KEY_PREFIX, keyid)
assert(bytes(plB) == plA)
assert(bytes(plB) == MESSAGE)
assert(plB == plA)
assert(plB == MESSAGE)