diff options
author | Franklin Wei <me@fwei.tk> | 2018-07-10 22:56:38 -0400 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-07-10 22:56:38 -0400 |
commit | 8aafb24ff873f9acea736a3574217256e2ebf5d9 (patch) | |
tree | 6606b2b7cdbbb75fff5033984c483e8fbec69151 /crypto.c | |
parent | 7f4cd7a5065ca29d4644b301b54f2db3e71b1647 (diff) | |
download | csaa-8aafb24ff873f9acea736a3574217256e2ebf5d9.zip csaa-8aafb24ff873f9acea736a3574217256e2ebf5d9.tar.gz csaa-8aafb24ff873f9acea736a3574217256e2ebf5d9.tar.bz2 csaa-8aafb24ff873f9acea736a3574217256e2ebf5d9.tar.xz |
Fix whitespace, indentation; minor changes to plotting script
Diffstat (limited to 'crypto.c')
-rw-r--r-- | crypto.c | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -224,44 +224,44 @@ hash_t hash_increment(hash_t h) #include <string.h> #include <openssl/engine.h> - static void *OPENSSL_zalloc(size_t num) - { +static void *OPENSSL_zalloc(size_t num) +{ void *ret = OPENSSL_malloc(num); if (ret != NULL) memset(ret, 0, num); return ret; - } +} - const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx) - { +const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx) +{ return ctx->iv; - } +} - unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx) - { +unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx) +{ return ctx->iv; - } +} - EVP_MD_CTX *EVP_MD_CTX_new(void) - { +EVP_MD_CTX *EVP_MD_CTX_new(void) +{ return OPENSSL_zalloc(sizeof(EVP_MD_CTX)); - } +} - void EVP_MD_CTX_free(EVP_MD_CTX *ctx) - { +void EVP_MD_CTX_free(EVP_MD_CTX *ctx) +{ EVP_MD_CTX_cleanup(ctx); OPENSSL_free(ctx); - } - HMAC_CTX *HMAC_CTX_new(void) - { +} +HMAC_CTX *HMAC_CTX_new(void) +{ HMAC_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); return ctx; - } +} - void HMAC_CTX_free(HMAC_CTX *ctx) - { +void HMAC_CTX_free(HMAC_CTX *ctx) +{ if (ctx != NULL) { OPENSSL_free(ctx); } |