Closed chenyunecjtu closed 6 years ago
` UInt512 seed = UINT512_ZERO; char* phraseString = "potato police mammal floor vivid gold elder robot human coin salt become"; BRBIP39DeriveKey(seed.u8, phraseString, NULL);
BRMasterPubKey mpk = BRBIP32MasterPubKey(&seed, sizeof(seed)); uint8_t pubkey[33]; BRBIP32PubKey(pubkey, 33, mpk, 0, 0|BIP32_HARD); BRKey key; BRKeySetPubKey(&key, pubkey, 33); BRAddress address; BRKeyAddress(&key, address.s, 75 ); printf("\n address 00:%s", address.s); BRKey k; BRBIP32PrivKey(&k, &seed, sizeof(seed), 0, 0|BIP32_HARD); BRKeyAddress(&k, address.s, 75 ); printf("\n address 00:%s", address.s);
`
` result: address 00:mh4cRJMez2NLgCd2yLHqJv7f5HYHpSQsHR address 00:mpCEStKUg1UuN8adit4moP5jwFigSHJmDs
address not same
resove
` UInt512 seed = UINT512_ZERO; char* phraseString = "potato police mammal floor vivid gold elder robot human coin salt become"; BRBIP39DeriveKey(seed.u8, phraseString, NULL);
`
` result: address 00:mh4cRJMez2NLgCd2yLHqJv7f5HYHpSQsHR address 00:mpCEStKUg1UuN8adit4moP5jwFigSHJmDs
`