def decrypt(self, passphrase, wif=False):
passphrase = normalize('<STR_LIT>', unicode(passphrase))<EOL>if is_py2:<EOL><INDENT>passphrase = passphrase.encode('<STR_LIT:utf8>')<EOL><DEDENT>if self.ec_multiply:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>key = scrypt.hash(passphrase, self.addresshash, <NUM_LIT>, <NUM_LIT:8>, <NUM_LIT:8>)<EOL>derivedhalf1 = key[<NUM_LIT:0>:<NUM_LIT:32>]<EOL>derivedhalf2 = key[<NUM_LIT:32>:<NUM_LIT:64>]<EOL>aes = AES.new(derivedhalf2)<EOL>decryptedhalf2 = aes.decrypt(self.encryptedhalf2)<EOL>decryptedhalf1 = aes.decrypt(self.encryptedhalf1)<EOL>priv = decryptedhalf1 + decryptedhalf2<EOL>priv = unhexlify('<STR_LIT>' % (long(hexlify(priv), <NUM_LIT:16>) ^ long(hexlify(derivedhalf1), <NUM_LIT:16>)))<EOL>pub = privtopub(priv)<EOL>if self.compressed:<EOL><INDENT>pub = encode_pubkey(pub, '<STR_LIT>')<EOL><DEDENT>addr = pubtoaddr(pub, self.pub_byte)<EOL>if is_py2:<EOL><INDENT>ascii_key = addr<EOL><DEDENT>else:<EOL><INDENT>ascii_key = bytes(addr,'<STR_LIT:ascii>')<EOL><DEDENT>if sha256(sha256(ascii_key).digest()).digest()[<NUM_LIT:0>:<NUM_LIT:4>] != self.addresshash:<EOL><INDENT>raise Exception('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>formatt = '<STR_LIT>' if wif else '<STR_LIT>'<EOL>if self.compressed:<EOL><INDENT>return encode_privkey(priv, formatt + '<STR_LIT>', self.priv_byte)<EOL><DEDENT>else:<EOL><INDENT>return encode_privkey(priv, formatt, self.priv_byte)<EOL><DEDENT><DEDENT>
BIP0038 non-ec-multiply decryption. Returns hex privkey.