{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# hfble\n\n# A login engine\n\n# Classes:\n\n\n## `LoginEngine(object)`\nThe objects have an attribute `db` which is intended to store a list of dicts, in which each dict has items with keys of \"username\" (storing a string - the username), \"salt\" (storing a string - the salt), \"hashedPassword\" (storing a string - the password, salted and hashed), and \"extra\" (storing a tuple - user's data).\n\n### `NoneType __init__()`\nBasic constructor, initializing some variables.\n\n### `str SaltGen()`\nGenerates a salt suitable for the hashing algorithm.\n\n### `str Encrypt(str content)`\nRuns the SHA512 hashing algorithm using `content`.\n\n### `int AccountFind(str username)`\nSearches through the loaded database for account data with a username equal to `username`. Returns the index of it if it is found; if it is not found, it returns -1.\n\n### `str Login(str username, str password)`\nAttempts to log in using the loaded database - returns a status string according to what happened with that - out of the self-explanatory set of \"SuccessfulLogin\", \"IncorrectPassword\", and \"UserDoesNotExists\".\n\n### `str Register(str username, str password, str|list UNprohibited, tuple extra)`\nAttempts to register an account into the database with the data as given in the arguments - `UNprohibited` defines what characters are not allowed in usernames, `extra` contains the user data to store with the account. It returns a status string according to what happened out of the self-explanatory set of \"SuccessfulRegister\", \"UsernameTaken\", \"EmptyUsername\", and \"InvalidCharInUsername\".\n\n### `str ChangePassword(str username, str oldPassword, str newPassword)`\nAttempts to change the password associated with the account specified by `username` to `newPassword`, but will only work if `oldPassword` is the correct current password. It returns a self-explanatory status string out of \"InvalidLogin\", \"SuccessfulPasswordChange\". It also generates a new salt when changing the password.\n\n\n## `LoginConsoleInteractivity(LoginEngine)`\nThe objects have an attribute `account` which is intended to store either a `NoneType` meaning that they are not logged in or a `str` representing the name of the account that they are logged into. In all of the UI functions, after the user finishes, it calls into `UIMain`.\n\n### `NoneType __init__(str|list UNrestrict)`\nBasic constructor, calling the parent constructor and initializing some variables.\n\n### `NoneType UILogin(bool v=False)`\nGives a console-based interface allowing a user to attempt to login, setting the attribute `account` in the process. `v` controls whether or not to output some extra \\[debugging\\] information that should not be shown in a production system.\n\n### `NoneType UIRegister(bool v=False)`\nGives a console-based interface allowing a user to attempt to register an account, editing the attribute `db` in the process. `v` controls whether or not to output some extra \\[debugging\\] information that should not be shown in a production system.\n\n### `NoneType UIReadData(bool v=False)`\nGives a console-based interface allowing a user to read the data associated with the account that they are logged in as. `v` controls whether or not to output some extra \\[debugging\\] information that should not be shown in a production system.\n\n### `NoneType UIWriteData(bool v=False)`\nGives a console-based interface allowing a user to attempt to edit an item in the data associated with the account that they are logged in as. `v` controls whether or not to output some extra \\[debugging\\] information that should not be shown in a production system.\n\n### `NoneType UIAppendData(bool v=False)`\nGives a console-based interface allowing a user to attempt to append an item to the list of data items associated with the account that they are logged in as. `v` controls whether or not to output some extra \\[debugging\\] information that should not be shown in a production system.\n\n### `NoneType UIChangePassword(bool v=False)`\nGives a console-based interface allowing a user to attempt to change the password stored (in salted+hashed form, of course) in the database associated with their account (but only if they correctly enter the old password). `v` controls whether or not to output some extra \\[debugging\\] information that should not be shown in a production system.\n\n### `NoneType UIMain(bool v=False)`\nGives a console-based interface allowing a user to access the other `UI...` functions, or to exit the function. When other `UI...` functions are exited, it returns to this one. `v` controls whether or not to output some extra \\[debugging\\] information that should not be shown in a production system.\n\n\n## `SaveManagerText()`\nThe RW format of this Save Manager is equivalent to the recommended format for `LoginEngine.db`.\n\n### `NoneType __init__(str filename)`\nBasic constructor, initializing some variables. `filename` is the name of the file it manages (should have a suffix of .txt, .dat, or, most preferably, .login). During the contsructor, it tests if the file with the name `filename` exists with try/finally.\n\n### `list Read()`\nReads from the object-associated file, returning the contents as a list in the format as is intended for `LoginEngine.db`.\n\n### `NoneType Write(list db)`\nWrites the database \\[assuming it is in the format appropriate for `LoginEngine.db`\\] to the object-associated file, in a way that is compatible with `SaveManagerText.Read`.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "hfble", "package_url": "https://pypi.org/project/hfble/", "platform": "", "project_url": "https://pypi.org/project/hfble/", "project_urls": null, "release_url": "https://pypi.org/project/hfble/2.0/", "requires_dist": null, "requires_python": "", "summary": "", "version": "2.0" }, "last_serial": 4527596, "releases": { "1.0b0": [], "1.0b1": [ { "comment_text": "", "digests": { "md5": "2264a9cdbf8bfbcc126fa7576bc7bfbb", "sha256": "ea1734da5ecf2e636f355297a813229d6f1a6c20025f3702b9b8d019326369e2" }, "downloads": -1, "filename": "hfble-1.0b1-py3-none-any.whl", "has_sig": false, "md5_digest": "2264a9cdbf8bfbcc126fa7576bc7bfbb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3435, "upload_time": "2018-06-21T16:21:52", "url": "https://files.pythonhosted.org/packages/2f/2f/016798746f4af3bf1fab1e66d6607b0ae933a775df09d51d7d779aabd7ee/hfble-1.0b1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b9753861f2576a7a117c38ec5a197577", "sha256": "7ba4132202b312942b4cdd7a774710250f1966107d67bf7ec17bf505c6256853" }, "downloads": -1, "filename": "hfble-1.0b1.tar.gz", "has_sig": false, "md5_digest": "b9753861f2576a7a117c38ec5a197577", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3405, "upload_time": "2018-06-21T16:23:31", "url": "https://files.pythonhosted.org/packages/8b/09/7ac47825ccb959c908fd5a40f444ec8690d4c6cc450f9e4bc25c306091de/hfble-1.0b1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "a8bcd51d2a2f72a8d36365509e1e2690", "sha256": "21aecf3e30d048206c56fa24a61b7185c48beaafce8c6d22ccd71a3d58b9f26c" }, "downloads": -1, "filename": "hfble-2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a8bcd51d2a2f72a8d36365509e1e2690", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6848, "upload_time": "2018-11-26T01:42:40", "url": "https://files.pythonhosted.org/packages/a1/6a/74f5b801e12a38bbef83097caed66a3586fae7a1341d96dc7e9c539f32d9/hfble-2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "069cf31b0c26b3366f6c571fffef9d19", "sha256": "5fc7bfe599b8e69884be7921ab4b2734754ed3fd685ff6a5c84632436e41bf21" }, "downloads": -1, "filename": "hfble-2.0.tar.gz", "has_sig": false, "md5_digest": "069cf31b0c26b3366f6c571fffef9d19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5746, "upload_time": "2018-11-26T01:42:41", "url": "https://files.pythonhosted.org/packages/86/de/c3582040f2298c98f3e57451cfc614cf06374c68becee0aae5e6e9bba6e6/hfble-2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a8bcd51d2a2f72a8d36365509e1e2690", "sha256": "21aecf3e30d048206c56fa24a61b7185c48beaafce8c6d22ccd71a3d58b9f26c" }, "downloads": -1, "filename": "hfble-2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a8bcd51d2a2f72a8d36365509e1e2690", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6848, "upload_time": "2018-11-26T01:42:40", "url": "https://files.pythonhosted.org/packages/a1/6a/74f5b801e12a38bbef83097caed66a3586fae7a1341d96dc7e9c539f32d9/hfble-2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "069cf31b0c26b3366f6c571fffef9d19", "sha256": "5fc7bfe599b8e69884be7921ab4b2734754ed3fd685ff6a5c84632436e41bf21" }, "downloads": -1, "filename": "hfble-2.0.tar.gz", "has_sig": false, "md5_digest": "069cf31b0c26b3366f6c571fffef9d19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5746, "upload_time": "2018-11-26T01:42:41", "url": "https://files.pythonhosted.org/packages/86/de/c3582040f2298c98f3e57451cfc614cf06374c68becee0aae5e6e9bba6e6/hfble-2.0.tar.gz" } ] }