{"id":40845061,"url":"https://github.com/amoghe/go-crypt","last_synced_at":"2026-01-21T23:12:21.119Z","repository":{"id":43731280,"uuid":"37893900","full_name":"amoghe/go-crypt","owner":"amoghe","description":"Golang wrappers for glibc crypt(3)","archived":false,"fork":false,"pushed_at":"2024-04-03T17:25:27.000Z","size":18,"stargazers_count":42,"open_issues_count":6,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-18T15:38:13.514Z","etag":null,"topics":["crypt","golang","libc"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amoghe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-23T03:02:24.000Z","updated_at":"2024-04-14T12:56:01.000Z","dependencies_parsed_at":"2024-06-18T15:31:17.018Z","dependency_job_id":null,"html_url":"https://github.com/amoghe/go-crypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amoghe/go-crypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoghe%2Fgo-crypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoghe%2Fgo-crypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoghe%2Fgo-crypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoghe%2Fgo-crypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amoghe","download_url":"https://codeload.github.com/amoghe/go-crypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amoghe%2Fgo-crypt/sbom","scorecard":{"id":190217,"data":{"date":"2025-08-11","repo":{"name":"github.com/amoghe/go-crypt","commit":"20eada5f5964c4608a057dd913cbd06835f11154"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 2/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T20:31:33.900Z","repository_id":43731280,"created_at":"2025-08-16T20:31:33.900Z","updated_at":"2025-08-16T20:31:33.900Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28646906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["crypt","golang","libc"],"created_at":"2026-01-21T23:12:20.604Z","updated_at":"2026-01-21T23:12:21.112Z","avatar_url":"https://github.com/amoghe.png","language":"Go","readme":"go-crypt (`crypt`)\n==================\n\n[![Build Status](https://travis-ci.org/amoghe/go-crypt.svg)](https://travis-ci.org/amoghe/go-crypt)\n\nPackage `crypt` provides go language wrappers around crypt(3). For further information on crypt see the\n[man page](http://man7.org/linux/man-pages/man3/crypt.3.html)\n\nIf you have questions about how to use crypt (the C function), it is likely this is not the package you\nare looking for.\n\n**NOTE** Depending on the platform, this package provides a `Crypt` function that is backed by different\nflavors of the libc crypt. This is done by detecting the GOOS and trying to build using `crypt_r` (the GNU\nextension) when on linux, and wrapping around plain 'ol `crypt` (guarded by a global lock) otherwise.\n\nExample\n-------\n```go\nimport (\n\t\"fmt\"\n\t\"github.com/amoghe/go-crypt\"\n)\n\nfunc main() {\n\tmd5, err := crypt.Crypt(\"password\", \"in\")\n\tif err != nil {\n\t\tfmt.Errorf(\"error:\", err)\n\t\treturn\n\t}\n\n\tsha512, err := crypt.Crypt(\"password\", \"$6$SomeSaltSomePepper$\")\n\tif err != nil {\n\t\tfmt.Errorf(\"error:\", err)\n\t\treturn\n\t}\n\n\tfmt.Println(\"MD5:\", md5)\n\tfmt.Println(\"SHA512:\", sha512)\n}\n```\n\nA Note On \"Salt\"\n----------------\n\nYou can find out more about salt [here](https://en.wikipedia.org/wiki/Salt_(cryptography))\n\nThe hash algorithm can be selected via the salt string. Here is how to do it (relevant\nsection from the man page):\n\n```\n   If salt is a character string starting with the characters\n   \"$id$\" followed by a string terminated by \"$\":\n\n       $id$salt$encrypted\n\n   then instead of using the DES machine, id identifies the\n   encryption method used and this then determines how the rest\n   of the password string is interpreted.  The following values\n   of id are supported:\n\n          ID  | Method\n          ─────────────────────────────────────────────────────────\n          1   | MD5\n          2a  | Blowfish (not in mainline glibc; added in some\n              | Linux distributions)\n          5   | SHA-256 (since glibc 2.7)\n          6   | SHA-512 (since glibc 2.7)\n\n   So $5$salt$encrypted is an SHA-256 encoded password and\n   $6$salt$encrypted is an SHA-512 encoded one.\n\n   \"salt\" stands for the up to 16 characters following \"$id$\" in\n   the salt.  The encrypted part of the password string is the\n   actual computed password.  The size of this string is fixed:\n\n   MD5     | 22 characters\n   SHA-256 | 43 characters\n   SHA-512 | 86 characters\n```\n\nPlatforms\n---------\n\nThis package has been tested on the following platforms:\n- ubuntu 14.04.2 (libc 2.19)\n- ubuntu 12.04.5 (libc 2.15)\n- centos         (libc 2.17)\n- fedora 22      (libc 2.21)\n\nAll the platforms tested on have GNU libc (with extensions) so that the GOOS=linux always\ncompiles the reentrant versions of the crypt function (`crypt_r`), and exposes it to go land.\n\nOther platforms (freebsd, netbsd) should also work (in theory) since their libc expose at least\na posix compliant crypt function. On these platforms the fallback should compile and expose the\n'plain' (non reentrant, thus globally locked) crypt function.\n\nUnfortunately, I do not have access to machines that run anything other than Linux, hence the other\nplatforms have not been tested, however I believe they should work just fine. If you can verify this\n(or provide a patch that fixes this), I would be grateful.\n\nTODO\n----\n* Find someone with access to *BSD system(s)\n\nLicense\n-------\n\nReleased under the [MIT License](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famoghe%2Fgo-crypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famoghe%2Fgo-crypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famoghe%2Fgo-crypt/lists"}