def encrypt(self, wif):
if not self.unlocked():<EOL><INDENT>raise WalletLocked<EOL><DEDENT>return format(bip38.encrypt(str(wif), self.masterkey), "<STR_LIT>")<EOL>
Encrypt the content according to BIP38

            :param str wif: Unencrypted key