summaryrefslogtreecommitdiffstats
path: root/src/crypto/cipher/aes128_ctr
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 21:06:09 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 21:06:09 +0200
commit9855a34f48acf6ae3aaeba9ec37756da41507e64 (patch)
treea02c2a507b3d536182d81e78b878b6b29c617cb9 /src/crypto/cipher/aes128_ctr
parent1ae3aae35193dce25e5534b12a46011ec7912bb4 (diff)
downloadfastd-9855a34f48acf6ae3aaeba9ec37756da41507e64.tar
fastd-9855a34f48acf6ae3aaeba9ec37756da41507e64.zip
Coding style: always add a space between a pointer's type and the *
Diffstat (limited to 'src/crypto/cipher/aes128_ctr')
-rw-r--r--src/crypto/cipher/aes128_ctr/nacl/cipher_aes128_ctr_nacl.c4
-rw-r--r--src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/crypto/cipher/aes128_ctr/nacl/cipher_aes128_ctr_nacl.c b/src/crypto/cipher/aes128_ctr/nacl/cipher_aes128_ctr_nacl.c
index 797572c..c9adfcd 100644
--- a/src/crypto/cipher/aes128_ctr/nacl/cipher_aes128_ctr_nacl.c
+++ b/src/crypto/cipher/aes128_ctr/nacl/cipher_aes128_ctr_nacl.c
@@ -42,12 +42,12 @@ struct __attribute__((aligned(16))) fastd_cipher_state {
/** Initializes the cipher state */
-static fastd_cipher_state_t* aes128_ctr_init(const uint8_t *key) {
+static fastd_cipher_state_t * aes128_ctr_init(const uint8_t *key) {
fastd_block128_t k;
memcpy(k.b, key, sizeof(fastd_block128_t));
fastd_cipher_state_t *state;
- if (posix_memalign((void**)&state, 16, sizeof(fastd_cipher_state_t)))
+ if (posix_memalign((void **)&state, 16, sizeof(fastd_cipher_state_t)))
abort();
crypto_stream_aes128ctr_beforenm(state->d, k.b);
diff --git a/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c b/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
index cbf1ed5..cfb824d 100644
--- a/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
+++ b/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
@@ -43,11 +43,11 @@ struct fastd_cipher_state {
/** Initializes the cipher state */
-static fastd_cipher_state_t* aes128_ctr_init(const uint8_t *key) {
+static fastd_cipher_state_t * aes128_ctr_init(const uint8_t *key) {
fastd_cipher_state_t *state = fastd_new(fastd_cipher_state_t);
state->aes = EVP_CIPHER_CTX_new();
- EVP_EncryptInit(state->aes, EVP_aes_128_ctr(), (const unsigned char*)key, NULL);
+ EVP_EncryptInit(state->aes, EVP_aes_128_ctr(), (const unsigned char *)key, NULL);
return state;
}
@@ -59,10 +59,10 @@ static bool aes128_ctr_crypt(const fastd_cipher_state_t *state, fastd_block128_t
if (!EVP_EncryptInit(state->aes, NULL, NULL, iv))
return false;
- if (!EVP_EncryptUpdate(state->aes, (unsigned char*)out, &clen, (const unsigned char*)in, len))
+ if (!EVP_EncryptUpdate(state->aes, (unsigned char *)out, &clen, (const unsigned char *)in, len))
return false;
- if (!EVP_EncryptFinal(state->aes, ((unsigned char*)out) + clen, &clen2))
+ if (!EVP_EncryptFinal(state->aes, ((unsigned char *)out) + clen, &clen2))
return false;
if ((size_t)(clen+clen2) != len)