def generate_address(self, passphrase):
inter = Bip38IntermediatePoint.create(passphrase, ownersalt=self.ownersalt)<EOL>public_key = privtopub(inter.passpoint)<EOL>derived = scrypt.hash(inter.passpoint, self.addresshash + inter.ownerentropy, <NUM_LIT>, <NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:64>)<EOL>derivedhalf1, derivedhalf2 = derived[:<NUM_LIT:32>], derived[<NUM_LIT:32>:]<EOL>unencrypted_prefix = bytes_to_int(self.pointbprefix) ^ (bytes_to_int(derived[<NUM_LIT>]) & <NUM_LIT>);<EOL>aes = AES.new(derivedhalf2)<EOL>block1 = aes.decrypt(self.pointbx1)<EOL>block2 = aes.decrypt(self.pointbx2)<EOL>raise Exception("<STR_LIT>")<EOL>return<EOL>block2 = long(hexlify(pointb2), <NUM_LIT:16>) ^ long(hexlify(derivedhalf1[<NUM_LIT:16>:]), <NUM_LIT:16>)<EOL>return pubtoaddr(*fast_multiply(pointb, passfactor))<EOL>
Make sure the confirm code is valid for the given password and address.