{"id":20332448,"url":"https://github.com/postfixadmin/pacrypt","last_synced_at":"2025-04-11T21:32:58.577Z","repository":{"id":44860983,"uuid":"382360136","full_name":"postfixadmin/pacrypt","owner":"postfixadmin","description":"standalone PHP library for creating various password hashes","archived":false,"fork":false,"pushed_at":"2025-02-21T14:26:15.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-25T17:23:19.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postfixadmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-02T13:48:11.000Z","updated_at":"2025-02-21T13:36:01.000Z","dependencies_parsed_at":"2022-08-23T22:21:20.040Z","dependency_job_id":null,"html_url":"https://github.com/postfixadmin/pacrypt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfixadmin%2Fpacrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfixadmin%2Fpacrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfixadmin%2Fpacrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfixadmin%2Fpacrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postfixadmin","download_url":"https://codeload.github.com/postfixadmin/pacrypt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248482928,"owners_count":21111402,"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","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-14T20:26:40.208Z","updated_at":"2025-04-11T21:32:58.550Z","avatar_url":"https://github.com/postfixadmin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostfixAdmin\\PasswordHashing\n\nStandalone PHP library for creating various password hashes\n\nNote, this library is still quite new (2021/07/02). It's quite likely to have major refactoring / renaming as it's reviewed.\n\n\n## Supported Mechanisms (hash formats)\n\nSee: https://github.com/postfixadmin/pacrypt/blob/46ddd21a28433faa8ea279e4161f7853a69b40cb/src/Crypt.php#L12\n\nSome mechanisms support either HEX (.HEX)  encoded or BASE64 (.B64) encoded output.\n\nCurrently:\n\n * SHA1, SHA1.HEX, SHA1.B64\n * SSHA\n * SSHA512\n * BLF-CRYPT, BLF-CRYPT.B64\n * SHA512-CRYPT, SHA512-CRYPT.B64\n * ARGON2I, ARGON2I.B64\n * ARGON2ID, ARGON2ID.B64\n * SHA256, SHA256-CRYPT, SHA256-CRYPT.B64\n * SHA512, SHA512.B64\n * MD5-CRYPT, MD5\n * PLAIN-MD5\n * CRYPT ({CRYPT} prefix, defaults to use Blowfish)\n * SYSTEM (DES CRYPT, best avoid)\n * PLAIN, CLEAR, CLEARTEXT (useful for testing)\n * COURIER:MD5\n * COURIER:MD5RAW\n * COURIER:SSHA (same as SSHA)\n * COURIER:SHA256 (same as SHA256)\n\n## Example usage\n\nThe main functionality reflects legacy behaviour in PostfixAdmin with a 'pacrypt' function, which when given ...\n\n * one argument - clear text password - returns a hash.\n * two arguments - clear text password and stored hash - if the return value matches the stored hash, then the clear text password was a match for the hash we have.\n\n```PHP\n$tool = new \\PostfixAdmin\\PasswordHashing\\Crypt('ARGON2I');\n\n// should output something to indicate what your system supports (may be dependent on PHP variant, PHP modules etc)\n\n$hash = $tool-\u003ecrypt('fishbeans');\n\necho \"Hash is: $hash \\n\";\n\necho \"Verify: \" . json_encode($hash == $tool-\u003ecrypt('fishbeans', $hash)) . \"\\n\";\necho \"Verify fails with: \" . json_encode('cat' == $tool-\u003ecrypt('fishbeans', $hash)) . \"\\n\";\n\n```\n\nthe above code will output something similar to:\n\n```text\nHash is: {ARGON2I}$argon2i$v=19$m=65536,t=4,p=1$d1JMUXVHSUtLTGhxYnowVQ$4raz6DDUbtRysi+1ZTdNL3L5j4tcSYnzWxyLVDtFjKc\nVerify: true\nVerify fails with: false\n```\n\n\n## ChangeLog\n\n2021/07/03 - Initial release / copying of code from https://github.com/postfixadmin/postfixadmin ...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostfixadmin%2Fpacrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostfixadmin%2Fpacrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostfixadmin%2Fpacrypt/lists"}