diff options
author | Christian Pointner <equinox@anytun.org> | 2012-09-25 11:55:47 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2012-09-25 11:55:47 +0000 |
commit | b85d2641b20159f25a4416d7c1322ec98c04eb0c (patch) | |
tree | 42779543116fee6f8963e1b172e767871bd1aed8 /src/key_derivation.c | |
parent | -Wall cleanup (diff) |
added clang support
Diffstat (limited to 'src/key_derivation.c')
-rw-r--r-- | src/key_derivation.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/key_derivation.c b/src/key_derivation.c index a01695b..8e6e95a 100644 --- a/src/key_derivation.c +++ b/src/key_derivation.c @@ -158,7 +158,7 @@ int key_derivation_generate_master_key(key_derivation_t* kd, const char* passphr #ifndef USE_SSL_CRYPTO gcry_md_hash_buffer(GCRY_MD_SHA256, digest.buf_, passphrase, strlen(passphrase)); #else - SHA256(passphrase, strlen(passphrase), digest.buf_); + SHA256((const u_int8_t*)passphrase, strlen(passphrase), digest.buf_); #endif kd->master_key_.length_ = key_length/8; @@ -213,7 +213,7 @@ int key_derivation_generate_master_salt(key_derivation_t* kd, const char* passph #ifndef USE_SSL_CRYPTO gcry_md_hash_buffer(GCRY_MD_SHA1, digest.buf_, passphrase, strlen(passphrase)); #else - SHA1(passphrase, strlen(passphrase), digest.buf_); + SHA1((const u_int8_t*)passphrase, strlen(passphrase), digest.buf_); #endif kd->master_salt_.length_ = salt_length/8; @@ -385,9 +385,8 @@ void key_derivation_aesctr_close(key_derivation_t* kd) return; if(kd->params_) { - key_derivation_aesctr_param_t* params = kd->params_; - #ifndef USE_SSL_CRYPTO + key_derivation_aesctr_param_t* params = kd->params_; if(params->handle_) gcry_cipher_close(params->handle_); #endif |