PicoHSM always returns bytes().
No need for casting. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user