1# Operations with pre-allocated output buffer
2try:
3    from ucryptolib import aes
4except ImportError:
5    print("SKIP")
6    raise SystemExit
7
8crypto = aes(b"1234" * 4, 1)
9enc = bytearray(32)
10crypto.encrypt(bytes(range(32)), enc)
11print(enc)
12
13crypto = aes(b"1234" * 4, 1)
14dec = bytearray(32)
15crypto.decrypt(enc, dec)
16print(dec)
17