{"id":18884768,"url":"https://github.com/leandroppf/findev-api","last_synced_at":"2025-07-27T09:34:16.430Z","repository":{"id":44501266,"uuid":"213113877","full_name":"leandroppf/FinDev-API","owner":"leandroppf","description":"API desenvolvida como Trabalho de Conclusão de Curso Ciência da Computação - UNIP 2019","archived":false,"fork":false,"pushed_at":"2022-12-22T12:41:13.000Z","size":406,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-24T00:37:16.271Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leandroppf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-06T05:28:49.000Z","updated_at":"2019-10-14T07:05:19.000Z","dependencies_parsed_at":"2023-01-30T09:01:24.755Z","dependency_job_id":null,"html_url":"https://github.com/leandroppf/FinDev-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leandroppf/FinDev-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandroppf%2FFinDev-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandroppf%2FFinDev-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandroppf%2FFinDev-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandroppf%2FFinDev-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leandroppf","download_url":"https://codeload.github.com/leandroppf/FinDev-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandroppf%2FFinDev-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267339386,"owners_count":24071540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T07:14:13.440Z","updated_at":"2025-07-27T09:34:16.395Z","avatar_url":"https://github.com/leandroppf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FinDev-API\nAPI desenvolvida como Trabalho de Conclusão de Curso Ciência da Computação - UNIP 2019\n\nPrimeiro passo, abra o terminal e digite \u003cb\u003eyarn\u003c/b\u003e para carregar as dependências.\n  \u003cbr/\u003eObs.: A pasta node_modules será criada com as dependências.\n\n\u003cb\u003eIMPORTANTE\u003c/b\u003e\u003cbr/\u003e\nNo projeto foi utilizada a criptografia bcrypt, com algumas modificações nas funções hash e compareSync. \n\n  A função hash foi modificada para:\n    \n     /**\n     * Asynchronously generates a hash for the given string.\n     * @param {string} s String to hash\n     * @param {number|string} salt Salt length to generate or salt to use\n     * @param {string} mail\n     * @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash\n     * @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed\n     *  (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.\n     * @returns {!Promise} If `callback` has been omitted\n     * @throws {Error} If `callback` is present but not a function\n     * @expose\n     */\n    bcrypt.hash = function(s, salt, mail, callback, progressCallback) {\n        if(mail){\n            var splitedMail = mail.split('@');\n            var pass = s;\n            s = splitedMail[0] + pass + splitedMail[1]\n        }\n\n        function _async(callback) {\n            if (typeof s === 'string' \u0026\u0026 typeof salt === 'number')\n                bcrypt.genSalt(salt, function(err, salt) {\n                    _hash(s, salt, callback, progressCallback);\n                });\n            else if (typeof s === 'string' \u0026\u0026 typeof salt === 'string')\n                _hash(s, salt, callback, progressCallback);\n            else\n                nextTick(callback.bind(this, Error(\"Illegal arguments: \"+(typeof s)+', '+(typeof salt))));\n        }\n\n        if (callback) {\n            if (typeof callback !== 'function')\n                throw Error(\"Illegal callback: \"+typeof(callback));\n            _async(callback);\n        } else\n            return new Promise(function(resolve, reject) {\n                _async(function(err, res) {\n                    if (err) {\n                        reject(err);\n                        return;\n                    }\n                    resolve(res);\n                });\n            });\n    };\n   \n   E a função compareSync foi modificada para:\n   \n    /**\n     * Synchronously tests a string against a hash.\n     * @param {string} s String to compare\n     * @param {string} hash Hash to test against\n     * @param {string} mail\n     * @returns {boolean} true if matching, otherwise false\n     * @throws {Error} If an argument is illegal\n     * @expose\n     */\n    bcrypt.compareSync = function(s, hash, mail) {\n        if(mail){\n            var splitedMail = mail.split('@');\n            var pass = s;\n            s = splitedMail[0] + pass + splitedMail[1]\n        }\n        \n        if (typeof s !== \"string\" || typeof hash !== \"string\")\n            throw Error(\"Illegal arguments: \"+(typeof s)+', '+(typeof hash));\n        if (hash.length !== 60)\n            return false;\n        return safeStringCompare(bcrypt.hashSync(s, hash.substr(0, hash.length-31)), hash);\n    };\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleandroppf%2Ffindev-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleandroppf%2Ffindev-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleandroppf%2Ffindev-api/lists"}