1# Inplace operations (input and output buffer is the same)
2try:
3    from ucryptolib import aes
4except ImportError:
5    print("SKIP")
6    raise SystemExit
7
8crypto = aes(b"1234" * 4, 1)
9buf = bytearray(bytes(range(32)))
10crypto.encrypt(buf, buf)
11print(buf)
12
13crypto = aes(b"1234" * 4, 1)
14crypto.decrypt(buf, buf)
15print(buf)
16