Utilities¶
- class nacl.utils.EncryptedMessage[source]¶
A
bytes
subclass that holds a message that has been encrypted by aSecretBox
orBox
. The full content of thebytes
object is the combinednonce
andciphertext
.- nonce¶
The nonce used during the encryption of the
EncryptedMessage
.
- ciphertext¶
The ciphertext contained within the
EncryptedMessage
.
- nacl.utils.random(size=32)[source]¶
Returns a random bytestring with the given
size
.- Parameters
size (bytes) – The size of the random bytestring.
- Return bytes
The random bytestring.