mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
messagesbytes -> messagebytes
This commit is contained in:
parent
cd721cfc1f
commit
f8e535a446
@ -378,13 +378,21 @@ _crypto_secretbox_xsalsa20poly1305_noncebytes 0 1
|
|||||||
_crypto_secretbox_xsalsa20poly1305_open 0 1
|
_crypto_secretbox_xsalsa20poly1305_open 0 1
|
||||||
_crypto_secretbox_xsalsa20poly1305_zerobytes 0 1
|
_crypto_secretbox_xsalsa20poly1305_zerobytes 0 1
|
||||||
_crypto_secretbox_zerobytes 0 1
|
_crypto_secretbox_zerobytes 0 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_abytes 1 1
|
||||||
_crypto_secretstream_xchacha20poly1305_init_pull 1 1
|
_crypto_secretstream_xchacha20poly1305_init_pull 1 1
|
||||||
_crypto_secretstream_xchacha20poly1305_init_push 1 1
|
_crypto_secretstream_xchacha20poly1305_init_push 1 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_initbytes 1 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_keybytes 1 1
|
||||||
_crypto_secretstream_xchacha20poly1305_keygen 1 1
|
_crypto_secretstream_xchacha20poly1305_keygen 1 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_messagebytes_max 1 1
|
||||||
_crypto_secretstream_xchacha20poly1305_pull 1 1
|
_crypto_secretstream_xchacha20poly1305_pull 1 1
|
||||||
_crypto_secretstream_xchacha20poly1305_push 1 1
|
_crypto_secretstream_xchacha20poly1305_push 1 1
|
||||||
_crypto_secretstream_xchacha20poly1305_rekey 1 1
|
_crypto_secretstream_xchacha20poly1305_rekey 1 1
|
||||||
_crypto_secretstream_xchacha20poly1305_statebytes 1 1
|
_crypto_secretstream_xchacha20poly1305_statebytes 1 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_tag_final 1 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_tag_message 1 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_tag_push 1 1
|
||||||
|
_crypto_secretstream_xchacha20poly1305_tag_rekey 1 1
|
||||||
_crypto_shorthash 1 1
|
_crypto_shorthash 1 1
|
||||||
_crypto_shorthash_bytes 1 1
|
_crypto_shorthash_bytes 1 1
|
||||||
_crypto_shorthash_keybytes 1 1
|
_crypto_shorthash_keybytes 1 1
|
||||||
@ -474,6 +482,7 @@ _crypto_stream_salsa2012_xor 0 1
|
|||||||
_crypto_stream_salsa208 0 1
|
_crypto_stream_salsa208 0 1
|
||||||
_crypto_stream_salsa208_keybytes 0 1
|
_crypto_stream_salsa208_keybytes 0 1
|
||||||
_crypto_stream_salsa208_keygen 0 1
|
_crypto_stream_salsa208_keygen 0 1
|
||||||
|
_crypto_stream_salsa208_messagebytes_max 0 1
|
||||||
_crypto_stream_salsa208_noncebytes 0 1
|
_crypto_stream_salsa208_noncebytes 0 1
|
||||||
_crypto_stream_salsa208_xor 0 1
|
_crypto_stream_salsa208_xor 0 1
|
||||||
_crypto_stream_salsa20_keybytes 0 1
|
_crypto_stream_salsa20_keybytes 0 1
|
||||||
|
@ -96,7 +96,7 @@ crypto_secretstream_xchacha20poly1305_push
|
|||||||
if (outlen_p != NULL) {
|
if (outlen_p != NULL) {
|
||||||
*outlen_p = 0U;
|
*outlen_p = 0U;
|
||||||
}
|
}
|
||||||
if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGESBYTES_MAX) {
|
if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX) {
|
||||||
sodium_misuse();
|
sodium_misuse();
|
||||||
}
|
}
|
||||||
crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k);
|
crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k);
|
||||||
@ -172,7 +172,7 @@ crypto_secretstream_xchacha20poly1305_pull
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
mlen = inlen - crypto_secretstream_xchacha20poly1305_ABYTES;
|
mlen = inlen - crypto_secretstream_xchacha20poly1305_ABYTES;
|
||||||
if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGESBYTES_MAX) {
|
if (mlen > crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX) {
|
||||||
sodium_misuse();
|
sodium_misuse();
|
||||||
}
|
}
|
||||||
crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k);
|
crypto_stream_chacha20_ietf(block, sizeof block, state->nonce, state->k);
|
||||||
@ -257,9 +257,9 @@ crypto_secretstream_xchacha20poly1305_keybytes(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
crypto_secretstream_xchacha20poly1305_messagesbytes_max(void)
|
crypto_secretstream_xchacha20poly1305_messagebytes_max(void)
|
||||||
{
|
{
|
||||||
return crypto_secretstream_xchacha20poly1305_MESSAGESBYTES_MAX;
|
return crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char
|
unsigned char
|
||||||
|
@ -29,10 +29,10 @@ size_t crypto_secretstream_xchacha20poly1305_initbytes(void);
|
|||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
size_t crypto_secretstream_xchacha20poly1305_keybytes(void);
|
size_t crypto_secretstream_xchacha20poly1305_keybytes(void);
|
||||||
|
|
||||||
#define crypto_secretstream_xchacha20poly1305_MESSAGESBYTES_MAX \
|
#define crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX \
|
||||||
((1ULL << 32) - 2ULL * 64ULL)
|
((1ULL << 32) - 2ULL * 64ULL)
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
size_t crypto_secretstream_xchacha20poly1305_messagesbytes_max(void);
|
size_t crypto_secretstream_xchacha20poly1305_messagebytes_max(void);
|
||||||
|
|
||||||
#define crypto_secretstream_xchacha20poly1305_TAG_MESSAGE 0x00
|
#define crypto_secretstream_xchacha20poly1305_TAG_MESSAGE 0x00
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
|
@ -181,8 +181,8 @@ main(void)
|
|||||||
crypto_secretstream_xchacha20poly1305_INITBYTES);
|
crypto_secretstream_xchacha20poly1305_INITBYTES);
|
||||||
assert(crypto_secretstream_xchacha20poly1305_keybytes() ==
|
assert(crypto_secretstream_xchacha20poly1305_keybytes() ==
|
||||||
crypto_secretstream_xchacha20poly1305_KEYBYTES);
|
crypto_secretstream_xchacha20poly1305_KEYBYTES);
|
||||||
assert(crypto_secretstream_xchacha20poly1305_messagesbytes_max() ==
|
assert(crypto_secretstream_xchacha20poly1305_messagebytes_max() ==
|
||||||
crypto_secretstream_xchacha20poly1305_MESSAGESBYTES_MAX);
|
crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX);
|
||||||
|
|
||||||
assert(crypto_secretstream_xchacha20poly1305_tag_message() ==
|
assert(crypto_secretstream_xchacha20poly1305_tag_message() ==
|
||||||
crypto_secretstream_xchacha20poly1305_TAG_MESSAGE);
|
crypto_secretstream_xchacha20poly1305_TAG_MESSAGE);
|
||||||
|
Loading…
Reference in New Issue
Block a user