This module provides native support for cryptographic algorithms. It’s loosely based on PyCrypto.
class AES - Advanced Encryption Standard
Returns a bytes object filled with random bits obtained from the hardware random number generator.
According to the ESP32 Technical Reference Manual, such bits "... can be used as the basis for cryptographical operations". "These true random numbers are generated based on the noise in the Wi-Fi/BT RF system. When Wi-Fi and BT are disabled, the random number generator will give out pseudo-random numbers."
bits is rounded upwards to the nearest multiple of 32 bits.