diff options
author | William Wennerström <william@wstrm.dev> | 2020-07-20 13:01:05 +0200 |
---|---|---|
committer | William Wennerström <william@wstrm.dev> | 2020-11-16 21:58:09 +0100 |
commit | 4711fc62a3d691d35400bc7316f9026c64227d51 (patch) | |
tree | c448799a2b86e184d5060cf4915376ce82fdfdb3 /src/omemo/omemo.c | |
parent | a0cf0844abeeffe83a13e438eff3c309bc9887e9 (diff) | |
download | profani-tty-4711fc62a3d691d35400bc7316f9026c64227d51.tar.gz |
Run make format on rebase
Diffstat (limited to 'src/omemo/omemo.c')
-rw-r--r-- | src/omemo/omemo.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index c6f92e46..e08d3f06 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -1654,13 +1654,16 @@ _generate_signed_pre_key(void) SIGNAL_UNREF(signed_pre_key); } - -void omemo_free(void *a) { +void +omemo_free(void* a) +{ gcry_free(a); } -char *omemo_encrypt_file(FILE *in, FILE *out, off_t file_size, int *gcry_res) { - unsigned char *key = gcry_random_bytes_secure( +char* +omemo_encrypt_file(FILE* in, FILE* out, off_t file_size, int* gcry_res) +{ + unsigned char* key = gcry_random_bytes_secure( AES256_GCM_KEY_LENGTH, GCRY_VERY_STRONG_RANDOM); @@ -1668,7 +1671,7 @@ char *omemo_encrypt_file(FILE *in, FILE *out, off_t file_size, int *gcry_res) { unsigned char nonce[AES256_GCM_NONCE_LENGTH]; gcry_create_nonce(nonce, AES256_GCM_NONCE_LENGTH); - char *fragment = aes256gcm_create_secure_fragment(key, nonce); + char* fragment = aes256gcm_create_secure_fragment(key, nonce); *gcry_res = aes256gcm_crypt_file(in, out, file_size, key, nonce, true); if (*gcry_res != GPG_ERR_NO_ERROR) { |