{"id":23161351,"url":"https://github.com/mfpierre/go-mcrypt","last_synced_at":"2025-08-18T02:32:02.920Z","repository":{"id":57482677,"uuid":"92513045","full_name":"mfpierre/go-mcrypt","owner":"mfpierre","description":"Go bindings for mcrypt library","archived":false,"fork":false,"pushed_at":"2017-05-29T16:07:13.000Z","size":16,"stargazers_count":14,"open_issues_count":2,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T18:11:55.204Z","etag":null,"topics":["golang","libmcrypt","mcrypt"],"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/mfpierre.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":"2017-05-26T13:26:07.000Z","updated_at":"2024-12-19T12:07:01.000Z","dependencies_parsed_at":"2022-09-02T06:20:37.553Z","dependency_job_id":null,"html_url":"https://github.com/mfpierre/go-mcrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mfpierre/go-mcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfpierre%2Fgo-mcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfpierre%2Fgo-mcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfpierre%2Fgo-mcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfpierre%2Fgo-mcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfpierre","download_url":"https://codeload.github.com/mfpierre/go-mcrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfpierre%2Fgo-mcrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270933682,"owners_count":24670474,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","libmcrypt","mcrypt"],"created_at":"2024-12-17T23:13:57.572Z","updated_at":"2025-08-18T02:32:02.635Z","avatar_url":"https://github.com/mfpierre.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-mcrypt\n\n[![Build Status](https://travis-ci.org/mfpierre/go-mcrypt.svg?branch=master)](https://travis-ci.org/mfpierre/go-mcrypt)\n\nGo bindings for mcrypt library.\n\nShould be compatible with most algo/modes supported by libmcrypt.\n\n## Requirements\n * libmcrypt (http://mcrypt.sourceforge.net/)\n\n## Usage\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\tmcrypt \"github.com/mfpierre/go-mcrypt\"\n)\n\nfunc main() {\n\tkey := []byte(\"here is a random key of 32 bytes\")\n\tplaintext := []byte(\"here is what you want to encrypt\")\n\tiv := make([]byte, 16)\n\n\t// using CAST-256 in ECB mode\n\tencrypted, _ := mcrypt.Encrypt(key, iv, plaintext, \"cast-256\", \"ecb\")\n\tdecrypted, _ := mcrypt.Decrypt(key, iv, encrypted, \"cast-256\", \"ecb\")\n\tfmt.Println(encrypted)\n\tfmt.Println(decrypted)\n}\n```\n\nBelow a reminder of IV \u0026 Key size that you can use depending on algo/mode settings\n\n|Cipher Name|Block Mode|Block Size|IV Size|Default Key Size|All Key Size(s)|\n|--- |--- |--- |--- |--- |--- |\n|CAST-128|CBC|8|8|16|16|\n|CAST-128|ECB|8|8|16|16|\n|CAST-128|OFB|8|8|16|16|\n|CAST-128|NOFB|8|8|16|16|\n|CAST-128|CFB|8|8|16|16|\n|CAST-128|NCFB|8|8|16|16|\n|CAST-128|CTR|8|8|16|16|\n|GOST|CBC|8|8|32|32|\n|GOST|ECB|8|8|32|32|\n|GOST|OFB|8|8|32|32|\n|GOST|NOFB|8|8|32|32|\n|GOST|CFB|8|8|32|32|\n|GOST|NCFB|8|8|32|32|\n|GOST|CTR|8|8|32|32|\n|Rijndael-128|CBC|16|16|32|16 24 32|\n|Rijndael-128|ECB|16|16|32|16 24 32|\n|Rijndael-128|OFB|16|16|32|16 24 32|\n|Rijndael-128|NOFB|16|16|32|16 24 32|\n|Rijndael-128|CFB|16|16|32|16 24 32|\n|Rijndael-128|NCFB|16|16|32|16 24 32|\n|Rijndael-128|CTR|16|16|32|16 24 32|\n|Twofish|CBC|16|16|32|16 24 32|\n|Twofish|ECB|16|16|32|16 24 32|\n|Twofish|OFB|16|16|32|16 24 32|\n|Twofish|NOFB|16|16|32|16 24 32|\n|Twofish|CFB|16|16|32|16 24 32|\n|Twofish|NCFB|16|16|32|16 24 32|\n|Twofish|CTR|16|16|32|16 24 32|\n|RC4|STREAM|1|0|256||\n|CAST-256|CBC|16|16|32|16 24 32|\n|CAST-256|ECB|16|16|32|16 24 32|\n|CAST-256|OFB|16|16|32|16 24 32|\n|CAST-256|NOFB|16|16|32|16 24 32|\n|CAST-256|CFB|16|16|32|16 24 32|\n|CAST-256|NCFB|16|16|32|16 24 32|\n|CAST-256|CTR|16|16|32|16 24 32|\n|LOKI97|CBC|16|16|32|16 24 32|\n|LOKI97|ECB|16|16|32|16 24 32|\n|LOKI97|OFB|16|16|32|16 24 32|\n|LOKI97|NOFB|16|16|32|16 24 32|\n|LOKI97|CFB|16|16|32|16 24 32|\n|LOKI97|NCFB|16|16|32|16 24 32|\n|LOKI97|CTR|16|16|32|16 24 32|\n|Rijndael-192|CBC|24|24|32|16 24 32|\n|Rijndael-192|ECB|24|24|32|16 24 32|\n|Rijndael-192|OFB|24|24|32|16 24 32|\n|Rijndael-192|NOFB|24|24|32|16 24 32|\n|Rijndael-192|CFB|24|24|32|16 24 32|\n|Rijndael-192|NCFB|24|24|32|16 24 32|\n|Rijndael-192|CTR|24|24|32|16 24 32|\n|Safer+|CBC|16|16|32|16 24 32|\n|Safer+|ECB|16|16|32|16 24 32|\n|Safer+|OFB|16|16|32|16 24 32|\n|Safer+|NOFB|16|16|32|16 24 32|\n|Safer+|CFB|16|16|32|16 24 32|\n|Safer+|NCFB|16|16|32|16 24 32|\n|Safer+|CTR|16|16|32|16 24 32|\n|WAKE|STREAM|1|0|32|32|\n|Blowfish|CBC|8|8|56||\n|Blowfish|ECB|8|8|56||\n|Blowfish|OFB|8|8|56||\n|Blowfish|NOFB|8|8|56||\n|Blowfish|CFB|8|8|56||\n|Blowfish|NCFB|8|8|56||\n|Blowfish|CTR|8|8|56||\n|DES|CBC|8|8|8|8|\n|DES|ECB|8|8|8|8|\n|DES|OFB|8|8|8|8|\n|DES|NOFB|8|8|8|8|\n|DES|CFB|8|8|8|8|\n|DES|NCFB|8|8|8|8|\n|DES|CTR|8|8|8|8|\n|Rijndael-256|CBC|32|32|32|16 24 32|\n|Rijndael-256|ECB|32|32|32|16 24 32|\n|Rijndael-256|OFB|32|32|32|16 24 32|\n|Rijndael-256|NOFB|32|32|32|16 24 32|\n|Rijndael-256|CFB|32|32|32|16 24 32|\n|Rijndael-256|NCFB|32|32|32|16 24 32|\n|Rijndael-256|CTR|32|32|32|16 24 32|\n|Serpent|CBC|16|16|32|16 24 32|\n|Serpent|ECB|16|16|32|16 24 32|\n|Serpent|OFB|16|16|32|16 24 32|\n|Serpent|NOFB|16|16|32|16 24 32|\n|Serpent|CFB|16|16|32|16 24 32|\n|Serpent|NCFB|16|16|32|16 24 32|\n|Serpent|CTR|16|16|32|16 24 32|\n|xTEA|CBC|8|8|16|16|\n|xTEA|ECB|8|8|16|16|\n|xTEA|OFB|8|8|16|16|\n|xTEA|NOFB|8|8|16|16|\n|xTEA|CFB|8|8|16|16|\n|xTEA|NCFB|8|8|16|16|\n|xTEA|CTR|8|8|16|16|\n|Blowfish|CBC|8|8|56||\n|Blowfish|ECB|8|8|56||\n|Blowfish|OFB|8|8|56||\n|Blowfish|NOFB|8|8|56||\n|Blowfish|CFB|8|8|56||\n|Blowfish|NCFB|8|8|56||\n|Blowfish|CTR|8|8|56||\n|enigma|STREAM|1|0|13||\n|RC2|CBC|8|8|128||\n|RC2|ECB|8|8|128||\n|RC2|OFB|8|8|128||\n|RC2|NOFB|8|8|128||\n|RC2|CFB|8|8|128||\n|RC2|NCFB|8|8|128||\n|RC2|CTR|8|8|128||\n|3DES|CBC|8|8|24|24|\n|3DES|ECB|8|8|24|24|\n|3DES|OFB|8|8|24|24|\n|3DES|NOFB|8|8|24|24|\n|3DES|CFB|8|8|24|24|\n|3DES|NCFB|8|8|24|24|\n|3DES|CTR|8|8|24|24|\n\n\n## Credits\nThanks to https://github.com/tblyler/go-mcrypt for initial implementation with rijndael\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfpierre%2Fgo-mcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfpierre%2Fgo-mcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfpierre%2Fgo-mcrypt/lists"}