Fix default_address()

This commit is contained in:
Jay Graber 2018-06-01 04:03:27 -07:00
parent 521a6f1fc0
commit dd099401a3
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@
TEST(keystore_tests, sapling_keys) {
auto sk = libzcash::SaplingSpendingKey::random();
auto addr = sk.default_address();
// Check that full viewing key derived from sk and expanded sk are the same
auto exp_sk = sk.expanded_spending_key();

View File

@ -60,7 +60,7 @@ std::array<unsigned char, 11> default_diversifier(const uint256& sk)
while (true) {
crypto_generichash_blake2b_state state;
crypto_generichash_blake2b_init_salt_personal(&state, nullptr, 0, 64, nullptr, ZCASH_EXPANDSEED_PERSONALIZATION);
crypto_generichash_blake2b_update(&state, blob, 33);
crypto_generichash_blake2b_update(&state, blob, 34);
crypto_generichash_blake2b_final(&state, res.data(), 11);
if (librustzcash_check_diversifier(res.data())) {