mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Adapt the _ALT style to our new standard
- in .h files: only put the context declaration inside the #ifdef _ALT (this was changed in 2.9.0, ie after the original PR) - in .c file: only leave selftest out of _ALT: even though some function are trivial to build from other parts, alt implementors might want to go another way about them (for efficiency or other reasons)
This commit is contained in:
@ -354,8 +354,6 @@ int mbedtls_chacha20_update( mbedtls_chacha20_context *ctx,
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#endif /* !MBEDTLS_CHACHA20_ALT */
|
||||
|
||||
int mbedtls_chacha20_crypt( const unsigned char key[32],
|
||||
const unsigned char nonce[12],
|
||||
uint32_t counter,
|
||||
@ -383,6 +381,8 @@ cleanup:
|
||||
return( result );
|
||||
}
|
||||
|
||||
#endif /* !MBEDTLS_CHACHA20_ALT */
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
|
||||
static const unsigned char test_keys[2][32] =
|
||||
|
Reference in New Issue
Block a user