{"id":15497292,"url":"https://github.com/jwerle/libbacon","last_synced_at":"2025-09-12T15:48:57.945Z","repository":{"id":16567897,"uuid":"19321793","full_name":"jwerle/libbacon","owner":"jwerle","description":"A C implementation of the Baconian Cipher ! BACON","archived":false,"fork":false,"pushed_at":"2014-05-02T16:07:12.000Z","size":232,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T21:49:43.856Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/jwerle.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":"2014-04-30T17:34:53.000Z","updated_at":"2023-09-07T15:26:23.000Z","dependencies_parsed_at":"2022-09-10T20:41:06.955Z","dependency_job_id":null,"html_url":"https://github.com/jwerle/libbacon","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jwerle/libbacon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Flibbacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Flibbacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Flibbacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Flibbacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwerle","download_url":"https://codeload.github.com/jwerle/libbacon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Flibbacon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274831976,"owners_count":25357962,"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-09-12T02:00:09.324Z","response_time":60,"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":[],"created_at":"2024-10-02T08:32:37.368Z","updated_at":"2025-09-12T15:48:57.891Z","avatar_url":"https://github.com/jwerle.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"libbacon\n========\n\nA C implementation of the Baconian Cipher ! BACON\n\n## about\n\nInspired by [bacon-cipher](https://github.com/mathiasbynens/bacon-cipher) !\n\nEncode or decodes a message with each letter of the plaintext replaced by a group of five of the letters consisting of either an `A` or `B`. This replacement is a binary encoding and is done according to the alphabet of the [Baconian cipher](http://en.wikipedia.org/wiki/Bacon's_cipher).\n\nThe default translation table is shown below:\n\n```\na   AAAAA   g     AABBA   n    ABBAA   t     BAABA\nb   AAAAB   h     AABBB   o    ABBAB   u-v   BAABB\nc   AAABA   i-j   ABAAA   p    ABBBA   w     BABAA\nd   AAABB   k     ABAAB   q    ABBBB   x     BABAB\ne   AABAA   l     ABABA   r    BAAAA   y     BABBA\nf   AABAB   m     ABABB   s    BAAAB   z     BABBB\n```\n\n## install\n\n[clib](https://github.com/clibs/clib):\n\n```sh\n$ clib install jwerle/libbacon\n```\n\nsource:\n\n```sh\n$ git clone git@github.com:jwerle/libbacon.git\n$ cd libbacon\n$ make\n$ make install\n```\n\n## usage\n\n**Command line utility:**\n\n*encode:*\n\n```sh\n$ echo abc | bacon --encode\nAAAAAAAAABAAABA\n```\n\n```sh\n$ { echo abc \u0026\u0026 echo def \u0026\u0026 echo ghi; }  | bacon --encode\nAAAAAAAAABAAABA\nAAABBAABAAAABAB\nAABBAAABBBABAAA\n```\n\n*decode:*\n\n```sh\n$ echo AAAAAAAAABAAABA | bacon --decode\nABC\n```\n\n```sh\n$ { echo 'AAAAAAAAABAAABA' \u0026\u0026 echo 'AAABBAABAAAABAB' \u0026\u0026 echo 'AABBAAABBBABAAA'; } | bacon --decode\nABC\nDEF\nGHI\n```\n\n**C Library:**\n\n*encode:*\n\n```c\n#include \u003cbacon.h\u003e\n#include \u003cstdio.h\u003e\n\nint\nmain (void) {\n  printf(\"%s\\n\", bacon_encode(\"foo bar\", NULL));\n  return 0;\n}\n```\n\n...yields:\n\n```\nAABABABBABABBAB AAAABAAAAABAAAA\n```\n\n*decode:*\n\n```c\n#include \u003cbacon.h\u003e\n#include \u003cstdio.h\u003e\n\nint\nmain (void) {\n  char *buf = \"AA AA AA AAA BAAAB AAAABBA ABAAA.ABAB#AABBA@AABB+BABAA/AABAAAABAABABABAA\"\n    \"B_ABBABBAAABBABABBB AABBBBBAAAABAAABBAABABAAB\u003cBBAABBBABAABABABBA\u003eBBABABB\"\n    \"B\";\n\n  printf(\"%s\\n\", bacon_decode(buf, NULL));\n  return 0;\n}\n```\n\n...yields:\n\n```\nA B CD E F G H IIKL MNO PQRST UUWX YZ\n```\n\n## api\n\nSee [bacon.h](https://github.com/jwerle/libbacon/blob/master/include/bacon.h)\n\n## license\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwerle%2Flibbacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwerle%2Flibbacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwerle%2Flibbacon/lists"}