Skip to content

Commit

Permalink
sodium ext: delete copypasta from sodium_crypto_kdf_derive_from_key()
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Jul 21, 2017
1 parent 0e2a7fc commit f8ffc96
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ext/sodium/libsodium.c
Original file line number Diff line number Diff line change
Expand Up @@ -2989,9 +2989,6 @@ PHP_FUNCTION(sodium_crypto_kdf_derive_from_key)
if (key_len != crypto_kdf_KEYBYTES) {
zend_throw_exception(sodium_exception_ce, "key should be sodium_crypto_kdf_KEYBYTES bytes", 0);
}
if (key_len != crypto_kdf_KEYBYTES) {
zend_throw_exception(sodium_exception_ce, "context should be sodium_crypto_kdf_KEYBYTES bytes", 0);
}
memcpy(ctx_padded, ctx, crypto_kdf_CONTEXTBYTES);
memset(ctx_padded + crypto_kdf_CONTEXTBYTES, 0, sizeof ctx_padded - crypto_kdf_CONTEXTBYTES);
salt[0] = (unsigned char) (((uint64_t) subkey_id) );
Expand Down

0 comments on commit f8ffc96

Please sign in to comment.