{"id":37172002,"url":"https://github.com/jan-bar/encryptionfile","last_synced_at":"2026-01-14T20:03:54.967Z","repository":{"id":65001055,"uuid":"351151913","full_name":"jan-bar/EncryptionFile","owner":"jan-bar","description":"一种安全加密数据的方式，数据可以实现自校验，防止数据损坏和篡改（A way to securely encrypt data, the data can be self-verified to prevent data damage and tampering）","archived":false,"fork":false,"pushed_at":"2023-12-16T13:06:41.000Z","size":34,"stargazers_count":62,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T10:11:49.507Z","etag":null,"topics":["aes","md5","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/jan-bar.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":"2021-03-24T16:35:49.000Z","updated_at":"2024-05-05T08:24:08.000Z","dependencies_parsed_at":"2023-12-16T14:28:29.450Z","dependency_job_id":"3af69c82-6786-43df-9056-16d0ed6222d1","html_url":"https://github.com/jan-bar/EncryptionFile","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jan-bar/EncryptionFile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-bar%2FEncryptionFile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-bar%2FEncryptionFile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-bar%2FEncryptionFile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-bar%2FEncryptionFile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jan-bar","download_url":"https://codeload.github.com/jan-bar/EncryptionFile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jan-bar%2FEncryptionFile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["aes","md5","rsa"],"created_at":"2026-01-14T20:03:54.339Z","updated_at":"2026-01-14T20:03:54.962Z","avatar_url":"https://github.com/jan-bar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## EncryptionFile\n\n[中文文档](README_CN.md)\n\nfor specific usage, please read: [EncryptionFile_test.go](EncryptionFile_test.go)\n\n### implementation\n\nthe password is related to the corresponding algorithm\n\nI have this format here: `password = [key + 0 + iv/nonce]`\n\n| rsa ciphertext length | rsa encrypted password data | algorithm encrypted content | hash value                                                        |\n|-----------------------|-----------------------------|-----------------------------|-------------------------------------------------------------------|\n| len(rsa(password))    | rsa(password)               | algorithm(content)          | hash.Sum(len(rsa(password)) + rsa(password) + algorithm(content)) |\n\n### cipher.AEAD\n\npassword composition: `password = [key + 0 + nonce]`\n\nthe nonce needs to be taken out correctly, and it must be ensured that there is no 0 in the key\n\n### cipher.Stream\n\npassword composition: `password = [key + 0 + iv]`\n\n### cipher.BlockMode\n\npassword composition: `password = [key + 0 + iv]`\n\n### example\n\nsupport encryption schemes in golang standard library: `cipher.AEAD,cipher.Stream,cipher.BlockMode`\n\nat the same time, several encryption schemes of aes are built in: `CFB,CTR,OFB,CBC,GCM`\n\n```go\n// an encryption scheme can be specified with the built-in method\n// GenEncCipher(cipher.NewCFBEncrypter)\n// GenEncCipher(cipher.NewCTR)\n// GenEncCipher(cipher.NewOFB)\n// GenEncCipher(cipher.NewCBCEncrypter)\n// GenEncCipher(cipher.NewGCM)\nEncData(Reader, Writer, pubKey, md5.New(), GenEncCipher(cipher.NewCFBEncrypter))\n\n// an decryption scheme can be specified with the built-in method\n// GenDecCipher(cipher.NewCFBDecrypter)\n// GenDecCipher(cipher.NewCTR)\n// GenDecCipher(cipher.NewOFB)\n// GenDecCipher(cipher.NewCBCDecrypter)\n// GenDecCipher(cipher.NewGCM)\nDecData(Reader, Writer, priKey, md5.New(), GenDecCipher(cipher.NewCFBDecrypter))\n```\n\nyou can also refer to [GenEncCipher](EncryptionFile.go#GenEncCipher) to write the method of generating encryption\n\nyou can also refer to [GenDecCipher](EncryptionFile.go#GenDecCipher) to write the method of generating decryption\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjan-bar%2Fencryptionfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjan-bar%2Fencryptionfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjan-bar%2Fencryptionfile/lists"}