Unlock the database.
        
        masterkey is needed.

def unlock(self, password = None, keyfile = None, buf = None):
        """Unlock the database.
        
        masterkey is needed.

        """

        if ((password is None or password == "") and (keyfile is None or
             keyfile == "")):
            raise KPError("A password/keyfile is needed")
        elif ((type(password) is not str and password is not None) or
              (type(keyfile) is not str and keyfile is not None)):
            raise KPError("password/keyfile must be a string.")
        if keyfile == "":
            keyfile = None
        if password == "":
            password = None
        self.password = password
        self.keyfile = keyfile
        return self.load(buf)