mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
mbedtls: make style
This commit is contained in:
parent
6324e2e746
commit
b1d6eaf2f7
177 changed files with 37224 additions and 41821 deletions
|
@ -62,8 +62,7 @@ extern "C" {
|
|||
/**
|
||||
* \brief Blowfish context structure
|
||||
*/
|
||||
typedef struct mbedtls_blowfish_context
|
||||
{
|
||||
typedef struct mbedtls_blowfish_context {
|
||||
uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2]; /*!< Blowfish round keys */
|
||||
uint32_t S[4][256]; /*!< key dependent S-boxes */
|
||||
}
|
||||
|
@ -79,7 +78,7 @@ mbedtls_blowfish_context;
|
|||
* \param ctx The Blowfish context to be initialized.
|
||||
* This must not be \c NULL.
|
||||
*/
|
||||
void mbedtls_blowfish_init( mbedtls_blowfish_context *ctx );
|
||||
void mbedtls_blowfish_init(mbedtls_blowfish_context *ctx);
|
||||
|
||||
/**
|
||||
* \brief Clear a Blowfish context.
|
||||
|
@ -89,7 +88,7 @@ void mbedtls_blowfish_init( mbedtls_blowfish_context *ctx );
|
|||
* returns immediately. If it is not \c NULL, it must
|
||||
* point to an initialized Blowfish context.
|
||||
*/
|
||||
void mbedtls_blowfish_free( mbedtls_blowfish_context *ctx );
|
||||
void mbedtls_blowfish_free(mbedtls_blowfish_context *ctx);
|
||||
|
||||
/**
|
||||
* \brief Perform a Blowfish key schedule operation.
|
||||
|
@ -103,8 +102,8 @@ void mbedtls_blowfish_free( mbedtls_blowfish_context *ctx );
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx, const unsigned char *key,
|
||||
unsigned int keybits );
|
||||
int mbedtls_blowfish_setkey(mbedtls_blowfish_context *ctx, const unsigned char *key,
|
||||
unsigned int keybits);
|
||||
|
||||
/**
|
||||
* \brief Perform a Blowfish-ECB block encryption/decryption operation.
|
||||
|
@ -122,10 +121,10 @@ int mbedtls_blowfish_setkey( mbedtls_blowfish_context *ctx, const unsigned char
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx,
|
||||
int mode,
|
||||
const unsigned char input[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE] );
|
||||
int mbedtls_blowfish_crypt_ecb(mbedtls_blowfish_context *ctx,
|
||||
int mode,
|
||||
const unsigned char input[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE]);
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_MODE_CBC)
|
||||
/**
|
||||
|
@ -156,12 +155,12 @@ int mbedtls_blowfish_crypt_ecb( mbedtls_blowfish_context *ctx,
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
|
||||
int mode,
|
||||
size_t length,
|
||||
unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
int mbedtls_blowfish_crypt_cbc(mbedtls_blowfish_context *ctx,
|
||||
int mode,
|
||||
size_t length,
|
||||
unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output);
|
||||
#endif /* MBEDTLS_CIPHER_MODE_CBC */
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_MODE_CFB)
|
||||
|
@ -196,13 +195,13 @@ int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
|
||||
int mode,
|
||||
size_t length,
|
||||
size_t *iv_off,
|
||||
unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
int mbedtls_blowfish_crypt_cfb64(mbedtls_blowfish_context *ctx,
|
||||
int mode,
|
||||
size_t length,
|
||||
size_t *iv_off,
|
||||
unsigned char iv[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output);
|
||||
#endif /*MBEDTLS_CIPHER_MODE_CFB */
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_MODE_CTR)
|
||||
|
@ -269,13 +268,13 @@ int mbedtls_blowfish_crypt_cfb64( mbedtls_blowfish_context *ctx,
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_blowfish_crypt_ctr( mbedtls_blowfish_context *ctx,
|
||||
size_t length,
|
||||
size_t *nc_off,
|
||||
unsigned char nonce_counter[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
unsigned char stream_block[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
int mbedtls_blowfish_crypt_ctr(mbedtls_blowfish_context *ctx,
|
||||
size_t length,
|
||||
size_t *nc_off,
|
||||
unsigned char nonce_counter[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
unsigned char stream_block[MBEDTLS_BLOWFISH_BLOCKSIZE],
|
||||
const unsigned char *input,
|
||||
unsigned char *output);
|
||||
#endif /* MBEDTLS_CIPHER_MODE_CTR */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue