Skip to content

Commit

Permalink
Indent
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Mar 13, 2017
1 parent 8f353b5 commit 70170c2
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include "utils.h"

int
crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char * pk,
unsigned char * sk,
crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char *pk,
unsigned char *sk,
const unsigned char *seed)
{
unsigned char hash[64];
Expand All @@ -37,7 +37,7 @@ crypto_box_curve25519xchacha20poly1305_keypair(unsigned char *pk,
}

int
crypto_box_curve25519xchacha20poly1305_beforenm(unsigned char * k,
crypto_box_curve25519xchacha20poly1305_beforenm(unsigned char *k,
const unsigned char *pk,
const unsigned char *sk)
{
Expand Down Expand Up @@ -80,9 +80,9 @@ crypto_box_curve25519xchacha20poly1305_detached(
}

int
crypto_box_curve25519xchacha20poly1305_easy_afternm(unsigned char * c,
crypto_box_curve25519xchacha20poly1305_easy_afternm(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "utils.h"

int
crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char * pk,
unsigned char * sk,
crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char *pk,
unsigned char *sk,
const unsigned char *seed)
{
unsigned char hash[64];
Expand All @@ -32,7 +32,7 @@ crypto_box_curve25519xsalsa20poly1305_keypair(unsigned char *pk,
}

int
crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char * k,
crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char *k,
const unsigned char *pk,
const unsigned char *sk)
{
Expand All @@ -46,19 +46,19 @@ crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char * k,
}

int
crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char * c,
crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char *c,
const unsigned char *m,
unsigned long long mlen,
unsigned long long mlen,
const unsigned char *n,
const unsigned char *k)
{
return crypto_secretbox_xsalsa20poly1305(c, m, mlen, n, k);
}

int
crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char * m,
crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char *m,
const unsigned char *c,
unsigned long long clen,
unsigned long long clen,
const unsigned char *n,
const unsigned char *k)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ crypto_generichash_blake2b_init_salt_personal(

int
crypto_generichash_blake2b_update(crypto_generichash_blake2b_state *state,
const unsigned char * in,
unsigned long long inlen)
const unsigned char *in,
unsigned long long inlen)
{
return blake2b_update(state, (const uint8_t *) in, (uint64_t) inlen);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ crypto_onetimeauth_poly1305_donna(unsigned char *out, const unsigned char *m,

static int
crypto_onetimeauth_poly1305_donna_init(crypto_onetimeauth_poly1305_state *state,
const unsigned char * key)
const unsigned char *key)
{
COMPILER_ASSERT(sizeof(crypto_onetimeauth_poly1305_state) >=
sizeof(poly1305_state_internal_t));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ crypto_onetimeauth_poly1305_verify(const unsigned char *h,

int
crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state,
const unsigned char * key)
const unsigned char *key)
{
return implementation->onetimeauth_init(state, key);
}

int
crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *state,
const unsigned char * in,
unsigned long long inlen)
const unsigned char *in,
unsigned long long inlen)
{
return implementation->onetimeauth_update(state, in, inlen);
}

int
crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state,
unsigned char * out)
unsigned char *out)
{
return implementation->onetimeauth_final(state, out);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static POLY1305_NOINLINE void
poly1305_init_ext(poly1305_state_internal_t *st, const unsigned char key[32],
unsigned long long bytes)
{
uint32_t * R;
uint32_t *R;
uint128_t d[3];
uint64_t r0, r1, r2;
uint64_t rt0, rt1, rt2, st2, c;
Expand Down Expand Up @@ -880,7 +880,7 @@ poly1305_finish(poly1305_state_internal_t *st, unsigned char mac[16])

static int
crypto_onetimeauth_poly1305_sse2_init(crypto_onetimeauth_poly1305_state *state,
const unsigned char * key)
const unsigned char *key)
{
COMPILER_ASSERT(sizeof(crypto_onetimeauth_poly1305_state) >=
sizeof(poly1305_state_internal_t));
Expand All @@ -901,7 +901,7 @@ crypto_onetimeauth_poly1305_sse2_update(

static int
crypto_onetimeauth_poly1305_sse2_final(crypto_onetimeauth_poly1305_state *state,
unsigned char * out)
unsigned char *out)
{
poly1305_finish((poly1305_state_internal_t *) (void *) state, out);

Expand Down
4 changes: 2 additions & 2 deletions src/libsodium/crypto_pwhash/argon2/argon2-encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ from_base64(void *dst, size_t *dst_len, const char *src)
static const char *
decode_decimal(const char *str, unsigned long *v)
{
const char * orig;
unsigned long acc;
const char *orig;
unsigned long acc;

acc = 0;
for (orig = str;; str++) {
Expand Down
2 changes: 1 addition & 1 deletion src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ generate_addresses(const argon2_instance_t *instance,
int
fill_segment_ref(const argon2_instance_t *instance, argon2_position_t position)
{
block * ref_block = NULL, *curr_block = NULL;
block *ref_block = NULL, *curr_block = NULL;
uint64_t pseudo_rand, ref_index, ref_lane;
uint32_t prev_offset, curr_offset;
uint32_t starting_index;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int
fill_segment_ssse3(const argon2_instance_t *instance,
argon2_position_t position)
{
block * ref_block = NULL, *curr_block = NULL;
block *ref_block = NULL, *curr_block = NULL;
uint64_t pseudo_rand, ref_index, ref_lane;
uint32_t prev_offset, curr_offset;
uint32_t starting_index, i;
Expand Down
4 changes: 2 additions & 2 deletions src/libsodium/crypto_pwhash/argon2/argon2.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ argon2_hash(const uint32_t t_cost, const uint32_t m_cost,
{
argon2_context context;
int result;
uint8_t * out;
uint8_t *out;

if (pwdlen > ARGON2_MAX_PWD_LENGTH) {
return ARGON2_PWD_TOO_LONG;
Expand Down Expand Up @@ -181,7 +181,7 @@ argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen,
argon2_type type)
{
argon2_context ctx;
uint8_t * out;
uint8_t *out;
int decode_result;
int ret;
size_t encoded_len;
Expand Down
4 changes: 2 additions & 2 deletions src/libsodium/crypto_pwhash/argon2/blake2b-long.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
int
blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen)
{
uint8_t * out = (uint8_t *) pout;
uint8_t *out = (uint8_t *) pout;
crypto_generichash_blake2b_state blake_state;
uint8_t outlen_bytes[4 /* sizeof(uint32_t) */] = { 0 };
int ret = -1;
int ret = -1;

if (outlen > UINT32_MAX) {
goto fail; /* LCOV_EXCL_LINE */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ escrypt_r(escrypt_local_t *local, const uint8_t *passwd, size_t passwdlen,
escrypt_kdf_t escrypt_kdf;
const uint8_t *src;
const uint8_t *salt;
uint8_t * dst;
uint8_t *dst;
size_t prefixlen;
size_t saltlen;
size_t need;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ blkxor(escrypt_block_t *dest, const escrypt_block_t *src, size_t len)
static void
salsa20_8(uint32_t B[16])
{
escrypt_block_t X;
uint32_t * x = X.w;
size_t i;
escrypt_block_t X;
uint32_t *x = X.w;
size_t i;

blkcpy_64(&X, (escrypt_block_t *) B);
for (i = 0; i < 8; i += 2) {
Expand Down
4 changes: 2 additions & 2 deletions src/libsodium/crypto_sign/ed25519/ref10/keypair.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ crypto_sign_ed25519_keypair(unsigned char *pk, unsigned char *sk)
}

int
crypto_sign_ed25519_pk_to_curve25519(unsigned char * curve25519_pk,
crypto_sign_ed25519_pk_to_curve25519(unsigned char *curve25519_pk,
const unsigned char *ed25519_pk)
{
ge_p3 A;
Expand All @@ -64,7 +64,7 @@ crypto_sign_ed25519_pk_to_curve25519(unsigned char * curve25519_pk,
}

int
crypto_sign_ed25519_sk_to_curve25519(unsigned char * curve25519_sk,
crypto_sign_ed25519_sk_to_curve25519(unsigned char *curve25519_sk,
const unsigned char *ed25519_sk)
{
unsigned char h[crypto_hash_sha512_BYTES];
Expand Down
8 changes: 4 additions & 4 deletions src/libsodium/crypto_sign/ed25519/ref10/obsolete.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ crypto_sign_edwards25519sha512batch_keypair(unsigned char *pk,
}

int
crypto_sign_edwards25519sha512batch(unsigned char * sm,
unsigned long long * smlen_p,
crypto_sign_edwards25519sha512batch(unsigned char *sm,
unsigned long long *smlen_p,
const unsigned char *m,
unsigned long long mlen,
const unsigned char *sk)
Expand Down Expand Up @@ -66,8 +66,8 @@ crypto_sign_edwards25519sha512batch(unsigned char * sm,
}

int
crypto_sign_edwards25519sha512batch_open(unsigned char * m,
unsigned long long * mlen_p,
crypto_sign_edwards25519sha512batch_open(unsigned char *m,
unsigned long long *mlen_p,
const unsigned char *sm,
unsigned long long smlen,
const unsigned char *pk)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ crypto_stream_aes128ctr_afternm(unsigned char *out, unsigned long long len,
aes_uint128_t nonce_stack;
unsigned long long lensav;
unsigned char bl[128];
unsigned char * blp;
unsigned char * np;
unsigned char *blp;
unsigned char *np;
unsigned char b;
uint32_t tmp;

Expand Down
6 changes: 3 additions & 3 deletions src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ copy2(aes_uint128_t *r, const aes_uint128_t *x)
void
shufb(aes_uint128_t *r, const unsigned char *l)
{
aes_uint128_t t;
uint8_t * ct;
uint8_t * cr;
aes_uint128_t t;
uint8_t *ct;
uint8_t *cr;

copy2(&t, r);
cr = r->u8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ crypto_stream_aes128ctr_xor_afternm(unsigned char *out, const unsigned char *in,
aes_uint128_t nonce_stack;
unsigned long long lensav;
unsigned char bl[128];
unsigned char * blp;
unsigned char * np;
unsigned char *blp;
unsigned char *np;
unsigned char b;
uint32_t tmp;

Expand Down
2 changes: 1 addition & 1 deletion src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ chacha20_encrypt_bytes(chacha_ctx *ctx, const uint8_t *m, uint8_t *c,
x15;
uint32_t j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14,
j15;
uint8_t * ctarget = NULL;
uint8_t *ctarget = NULL;
uint8_t tmp[64];
unsigned int i;

Expand Down

0 comments on commit 70170c2

Please sign in to comment.