mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 09:48:29 +00:00
Make it possible to compile redbean with chibicc
This cuts build latency down from 5 seconds to 500 milliseconds.
This commit is contained in:
parent
552525cbdd
commit
6ff46ca373
50 changed files with 898 additions and 824 deletions
20
third_party/mbedtls/chachapoly.h
vendored
20
third_party/mbedtls/chachapoly.h
vendored
|
@ -4,8 +4,8 @@
|
|||
#include "third_party/mbedtls/poly1305.h"
|
||||
/* clang-format off */
|
||||
|
||||
#define MBEDTLS_ERR_CHACHAPOLY_BAD_STATE -0x0054 /**< The requested operation is not permitted in the current state. */
|
||||
#define MBEDTLS_ERR_CHACHAPOLY_AUTH_FAILED -0x0056 /**< Authenticated decryption failed: data was not authentic. */
|
||||
#define MBEDTLS_ERR_CHACHAPOLY_BAD_STATE -0x0054 /*< The requested operation is not permitted in the current state. */
|
||||
#define MBEDTLS_ERR_CHACHAPOLY_AUTH_FAILED -0x0056 /*< Authenticated decryption failed: data was not authentic. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -13,8 +13,8 @@ extern "C" {
|
|||
|
||||
typedef enum
|
||||
{
|
||||
MBEDTLS_CHACHAPOLY_ENCRYPT, /**< The mode value for performing encryption. */
|
||||
MBEDTLS_CHACHAPOLY_DECRYPT /**< The mode value for performing decryption. */
|
||||
MBEDTLS_CHACHAPOLY_ENCRYPT, /*< The mode value for performing encryption. */
|
||||
MBEDTLS_CHACHAPOLY_DECRYPT /*< The mode value for performing decryption. */
|
||||
}
|
||||
mbedtls_chachapoly_mode_t;
|
||||
|
||||
|
@ -24,12 +24,12 @@ mbedtls_chachapoly_mode_t;
|
|||
|
||||
typedef struct mbedtls_chachapoly_context
|
||||
{
|
||||
mbedtls_chacha20_context chacha20_ctx; /**< The ChaCha20 context. */
|
||||
mbedtls_poly1305_context poly1305_ctx; /**< The Poly1305 context. */
|
||||
uint64_t aad_len; /**< The length (bytes) of the Additional Authenticated Data. */
|
||||
uint64_t ciphertext_len; /**< The length (bytes) of the ciphertext. */
|
||||
int state; /**< The current state of the context. */
|
||||
mbedtls_chachapoly_mode_t mode; /**< Cipher mode (encrypt or decrypt). */
|
||||
mbedtls_chacha20_context chacha20_ctx; /*< The ChaCha20 context. */
|
||||
mbedtls_poly1305_context poly1305_ctx; /*< The Poly1305 context. */
|
||||
uint64_t aad_len; /*< The length (bytes) of the Additional Authenticated Data. */
|
||||
uint64_t ciphertext_len; /*< The length (bytes) of the ciphertext. */
|
||||
int state; /*< The current state of the context. */
|
||||
mbedtls_chachapoly_mode_t mode; /*< Cipher mode (encrypt or decrypt). */
|
||||
}
|
||||
mbedtls_chachapoly_context;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue