{"id":18023577,"url":"https://github.com/jeffotoni/gcry","last_synced_at":"2025-07-17T02:10:44.247Z","repository":{"id":134047104,"uuid":"105386843","full_name":"jeffotoni/gcry","owner":"jeffotoni","description":"An exercise with some algorithms of encryption in Golang, like CBC, CFB, GCM, OFB, MD5, BLOWFIS etc.","archived":false,"fork":false,"pushed_at":"2018-03-20T02:13:39.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T06:39:08.035Z","etag":null,"topics":["blowfish-algorithm","criptografia","criptography","crypto-cbc","crypto-coin","cryptography","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/jeffotoni.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-30T17:19:16.000Z","updated_at":"2018-12-22T04:14:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"06569ad4-537d-4337-ba78-16a3ae989db8","html_url":"https://github.com/jeffotoni/gcry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeffotoni/gcry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fgcry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fgcry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fgcry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fgcry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffotoni","download_url":"https://codeload.github.com/jeffotoni/gcry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffotoni%2Fgcry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265560095,"owners_count":23788129,"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":["blowfish-algorithm","criptografia","criptography","crypto-cbc","crypto-coin","cryptography","go","golang"],"created_at":"2024-10-30T07:09:56.638Z","updated_at":"2025-07-17T02:10:44.232Z","avatar_url":"https://github.com/jeffotoni.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gcry\n\nLib that abstracts the encryption algorithms used by golang.\n\nThe goal is to further facilitate the native ualization of existing libs in Go.\n\nWe use numbers like CBC, CFB, GCM, OFB, MD5, BLOWFISH etc.\n\n## Structure of the program\n\n```go\n\n- gcry\n\t- example\n\t\t- main-blofish-uid-rand.go\n\t\t- main-blofish.go\n\t\t- main-cbc.go\n\t\t- main-cfb.go\n\t\t- main-gcm.go\n\t\t- main-hash-file.go\n\t\t- main-sh1.go\n\t\t- main-uid-rand.go\n\n\t- api-blofish-uid-rand.go\n\t- api-blofish.go\n\t- api-cbc.go\n\t- api-cfb.go\n\t- api-gcm.go\n\t- api-hash-file.go\n\t- api-sh1.go\n\t- api-uid-rand.go\n\n```\n\n# Using EncryptGCM\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfsunc main() {\n\n\ttextCry := gcry.EncryptGCM(\"Let's encrypt our text here.\")\n\tfmt.Println(textCry)\n\n\ttextDescry := gcry.DecryptGCM(textCry)\n\tfmt.Println(textDescry)\n}\n\n```\n\n# Using EncryptCFB\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\n//\n//\n//\nfunc main() {\n\n\tcipherText := gcry.EncryptCFB(\"new functional ex: of crifra CFB \")\n\n\tfmt.Println(cipherText)\n\n\ttextplan := gcry.DecryptCFB(cipherText)\n\tfmt.Println(textplan)\n}\n\n```\n\n# Using EncryptCBC\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\n//\n//\n//\nfunc main() {\n\n\t// multiple 16 len text\n\tcipherText := gcry.EncryptCBC(\"new functional ex: of crifra CBC\")\n\n\tfmt.Println(cipherText)\n\n\ttextplan := gcry.DecryptCBC(cipherText)\n\n\tfmt.Println(textplan)\n}\n\n```\n\n# Using Uid Rand\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfunc main() {\n\n\tfmt.Println(gcry.UidRand())\n}\n\n```\n\n# Using Sha1\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfunc main() {\n\n\tpassword := \"1234567890#$\"\n\n\thash := gcry.Sha1(password)\n\n\tfmt.Println(hash)\n}\n\n```\n\n# Using Blowfish\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfunc main() {\n\n\tpassword := \"1234567890#$\"\n\n\thashBlo := gcry.Blowfish(password)\n\n\tif gcry.CheckBlowfish(password, hashBlo) {\n\n\t\tfmt.Println(\"ok, password correct!\")\n\n\t} else {\n\n\t\tfmt.Println(\"ok, password incorrect!\")\n\t}\n\n}\n\n```\n\n# Using Blowfish Uid\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfunc main() {\n\n\tfmt.Println(gcry.BlowfishUid())\n}\n\n```\n\n# Using HashFile\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfunc main() {\n\n\thash, _ := gcry.HashFile(\"main-cbc.go\")\n\tfmt.Println(hash)\n}\n\n```\n\n# Using Sha256\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfunc main() {\n\n\tpassword := \"1234567890#$\"\n\n\thash := gcry.Sha256(password)\n}\n\n```\n\n# Using OFB File\n\nIt is possible to encrypt files, ie your content will be encrypted and generated a new file.\n\n```go\n\npackage main\n\nimport (\n\t\"fmt\"\n\tgcry \"github.com/jeffotoni/gcry\"\n)\n\nfunc main() {\n\t\n\tfileCry := gcry.EncryptOFBFile(\"main-cbc.go\")\n\n\tfmt.Println(fileCry)\n\n\tfileDecry := gcry.DecryptOFBFile(fileCry)\n\n\tfmt.Println(fileDecry)\n}\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffotoni%2Fgcry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffotoni%2Fgcry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffotoni%2Fgcry/lists"}