{"id":46059394,"url":"https://github.com/go-think/openssl","last_synced_at":"2026-03-01T11:01:15.276Z","repository":{"id":37700148,"uuid":"183744272","full_name":"go-think/openssl","owner":"go-think","description":"A functions wrapping of OpenSSL library for symmetric and asymmetric encryption and decryption.","archived":false,"fork":false,"pushed_at":"2025-11-12T06:38:19.000Z","size":46,"stargazers_count":304,"open_issues_count":0,"forks_count":52,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-01-14T23:28:06.020Z","etag":null,"topics":["aes","aes-256","aes-cbc","aes-encryption","cbc","des","ecb","encryption","openssl","rsa"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-think.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-27T07:49:20.000Z","updated_at":"2025-12-28T04:01:40.000Z","dependencies_parsed_at":"2024-01-23T17:21:47.828Z","dependency_job_id":"f716ccc7-4c88-4477-a8a1-5c90e0e6ec03","html_url":"https://github.com/go-think/openssl","commit_stats":{"total_commits":26,"total_committers":5,"mean_commits":5.2,"dds":0.2692307692307693,"last_synced_commit":"f138978d19814f3943a8919752648ab264a8e9c2"},"previous_names":["thinkoner/openssl","go-think/openssl","forgoer/openssl"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/go-think/openssl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-think%2Fopenssl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-think%2Fopenssl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-think%2Fopenssl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-think%2Fopenssl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-think","download_url":"https://codeload.github.com/go-think/openssl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-think%2Fopenssl/sbom","scorecard":{"id":406977,"data":{"date":"2025-08-11","repo":{"name":"github.com/forgoer/openssl","commit":"c9ef36433b18086a877d0926787ea1bbdd8cfe57"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/23 approved changesets -- score normalized to 1","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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/forgoer/openssl/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/forgoer/openssl/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/forgoer/openssl/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/forgoer/openssl/build.yml/master?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/build.yml:28","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"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":"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":"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: Apache License 2.0: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/build.yml:33"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 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-18T21:33:25.171Z","repository_id":37700148,"created_at":"2025-08-18T21:33:25.171Z","updated_at":"2025-08-18T21:33:25.171Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29967930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T10:55:55.490Z","status":"ssl_error","status_checked_at":"2026-03-01T10:55:55.175Z","response_time":124,"last_error":"SSL_read: 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":["aes","aes-256","aes-cbc","aes-encryption","cbc","des","ecb","encryption","openssl","rsa"],"created_at":"2026-03-01T11:01:11.949Z","updated_at":"2026-03-01T11:01:15.254Z","avatar_url":"https://github.com/go-think.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Openssl encryption\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-think/openssl)](https://goreportcard.com/report/github.com/go-think/openssl)\n[![build](https://github.com/go-think/openssl/actions/workflows/build.yml/badge.svg)](https://github.com/go-think/openssl/actions/workflows/build.yml)\n[![Coverage Status](https://coveralls.io/repos/github/go-think/openssl/badge.svg?branch=master)](https://coveralls.io/github/go-think/openssl?branch=master)\n[![Godoc](https://godoc.org/github.com/go-think/openssl?status.svg)](https://pkg.go.dev/github.com/go-think/openssl)\n[![Release](https://img.shields.io/github/release/go-think/openssl.svg)](https://github.com/go-think/openssl/releases/latest)\n\nA functions wrapping of OpenSSL library for symmetric and asymmetric encryption and decryption\n\n- [AES](#AES)\n- [DES](#DES)\n- [3DES](#DES)\n- [RSA](#RSA)\n- [HMAC-SHA](#HMAC-SHA)\n\n## Installation\n\nThe only requirement is the [Go Programming Language](https://golang.org/dl/)\n\n```\ngo get -u github.com/go-think/openssl\n```\n\n## Usage\n\n### AES\n\nThe length of the key can be 16/24/32 characters (128/192/256 bits)\n\nAES-ECB:\n\n```go \nsrc := []byte(\"123456\")\nkey := []byte(\"1234567890123456\")\ndst , _ := openssl.AesECBEncrypt(src, key, openssl.PKCS7_PADDING)\nfmt.Printf(base64.StdEncoding.EncodeToString(dst))  // yXVUkR45PFz0UfpbDB8/ew==\n\ndst , _ = openssl.AesECBDecrypt(dst, key, openssl.PKCS7_PADDING)\nfmt.Println(string(dst)) // 123456\n```\n\nAES-CBC:\n\n```go\nsrc := []byte(\"123456\")\nkey := []byte(\"1234567890123456\")\niv := []byte(\"1234567890123456\")\ndst , _ := openssl.AesCBCEncrypt(src, key, iv, openssl.PKCS7_PADDING)\nfmt.Println(base64.StdEncoding.EncodeToString(dst)) // 1jdzWuniG6UMtoa3T6uNLA==\n\ndst , _ = openssl.AesCBCDecrypt(dst, key, iv, openssl.PKCS7_PADDING)\nfmt.Println(string(dst)) // 123456\n```\n\n### DES\n\nThe length of the key must be 8 characters (64 bits).\n\nDES-ECB:\n\n```go\nopenssl.DesECBEncrypt(src, key, openssl.PKCS7_PADDING)\nopenssl.DesECBDecrypt(src, key, openssl.PKCS7_PADDING)\n```\n\nDES-CBC:\n\n```go\nopenssl.DesCBCEncrypt(src, key, iv, openssl.PKCS7_PADDING)\nopenssl.DesCBCDecrypt(src, key, iv, openssl.PKCS7_PADDING)\n```\n\n### 3DES\n\nThe length of the key must be 24 characters (192 bits).\n\n3DES-ECB:\n\n```go\nopenssl.Des3ECBEncrypt(src, key, openssl.PKCS7_PADDING)\nopenssl.Des3ECBDecrypt(src, key, openssl.PKCS7_PADDING)\n```\n\n3DES-CBC:\n\n```go\nopenssl.Des3CBCEncrypt(src, key, iv, openssl.PKCS7_PADDING)\nopenssl.Des3CBCDecrypt(src, key, iv, openssl.PKCS7_PADDING)\n```\n\n### RSA\n\n```go\nopenssl.RSAGenerateKey(bits int, out io.Writer)\nopenssl.RSAGeneratePublicKey(priKey []byte, out io.Writer)\n\nopenssl.RSAEncrypt(src, pubKey []byte) ([]byte, error)\nopenssl.RSADecrypt(src, priKey []byte) ([]byte, error)\n\nopenssl.RSASign(src []byte, priKey []byte, hash crypto.Hash) ([]byte, error)\nopenssl.RSAVerify(src, sign, pubKey []byte, hash crypto.Hash) error\n```\n\n### HMAC-SHA\n\n```\n// Sha1 Calculate the sha1 hash of a string\nSha1(str string) []byte\n\n// HmacSha1 Calculate the sha1 hash of a string using the HMAC method\nHmacSha1(key string, data string) []byte\n\n// HmacSha1ToString Calculate the sha1 hash of a string using the HMAC method, outputs lowercase hexits\nHmacSha1ToString(key string, data string) string\n\n// Sha256 Calculate the sha256 hash of a string\nSha256(str string) []byte\n\n// HmacSha256 Calculate the sha256 hash of a string using the HMAC method\nHmacSha256(key string, data string) []byte\n\n// HmacSha256ToString Calculate the sha256 hash of a string using the HMAC method, outputs lowercase hexits\nHmacSha256ToString(key string, data string) string\n```\n\n## License\n\nThis project is licensed under the [Apache 2.0 license](LICENSE).\n\n## Contact\n\nIf you have any issues or feature requests, please contact us. PR is welcomed.\n- https://github.com/go-think/openssl/issues\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-think%2Fopenssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-think%2Fopenssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-think%2Fopenssl/lists"}