Voice et bot modif
This commit is contained in:
parent
189d56026b
commit
7333a22bcd
10774 changed files with 634644 additions and 933308 deletions
|
|
@ -52,9 +52,9 @@ class SecretBox(encoding.Encodable, StringFixer):
|
|||
KEY_SIZE: ClassVar[int] = nacl.bindings.crypto_secretbox_KEYBYTES
|
||||
NONCE_SIZE: ClassVar[int] = nacl.bindings.crypto_secretbox_NONCEBYTES
|
||||
MACBYTES: ClassVar[int] = nacl.bindings.crypto_secretbox_MACBYTES
|
||||
MESSAGEBYTES_MAX: ClassVar[
|
||||
int
|
||||
] = nacl.bindings.crypto_secretbox_MESSAGEBYTES_MAX
|
||||
MESSAGEBYTES_MAX: ClassVar[int] = (
|
||||
nacl.bindings.crypto_secretbox_MESSAGEBYTES_MAX
|
||||
)
|
||||
|
||||
def __init__(
|
||||
self, key: bytes, encoder: encoding.Encoder = encoding.RawEncoder
|
||||
|
|
@ -103,7 +103,7 @@ class SecretBox(encoding.Encodable, StringFixer):
|
|||
"The nonce must be exactly %s bytes long" % self.NONCE_SIZE,
|
||||
)
|
||||
|
||||
ciphertext = nacl.bindings.crypto_secretbox(
|
||||
ciphertext = nacl.bindings.crypto_secretbox_easy(
|
||||
plaintext, nonce, self._key
|
||||
)
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ class SecretBox(encoding.Encodable, StringFixer):
|
|||
"The nonce must be exactly %s bytes long" % self.NONCE_SIZE,
|
||||
)
|
||||
|
||||
plaintext = nacl.bindings.crypto_secretbox_open(
|
||||
plaintext = nacl.bindings.crypto_secretbox_open_easy(
|
||||
ciphertext, nonce, self._key
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue