def _new_masterpassword(self, password):
<EOL>if self.config_key in self.config and self.config[self.config_key]:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>self.decrypted_master = hexlify(os.urandom(<NUM_LIT:32>)).decode("<STR_LIT:ascii>")<EOL>self.password = password<EOL>self._save_encrypted_masterpassword()<EOL>return self.masterkey<EOL>
Generate a new random masterkey, encrypt it with the password and
            store it in the store.

            :param str password: Password to use for en-/de-cryption