def unlock_database(self, passphrase): from mypass.storage import Database db = Database.decrypt(self._ciphertext, passphrase) del self._ciphertext self._set_database(db)
def create_database(self, passphrase): from mypass.storage import Database self._set_database(Database.create(passphrase))