{"id":51388028,"url":"https://github.com/namtxs/go-crypt","last_synced_at":"2026-07-03T21:06:55.224Z","repository":{"id":65423851,"uuid":"587813338","full_name":"namtxs/go-crypt","owner":"namtxs","description":"AES Encrypt Decrypt String With Key (Base64, Gzip, HEX)","archived":false,"fork":false,"pushed_at":"2023-01-11T16:57:24.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-27T23:40:23.728Z","etag":null,"topics":["aes","decryption-algorithm","encryption-decryption"],"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/namtxs.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}},"created_at":"2023-01-11T16:41:37.000Z","updated_at":"2023-03-02T23:09:51.000Z","dependencies_parsed_at":"2023-02-09T03:46:18.670Z","dependency_job_id":null,"html_url":"https://github.com/namtxs/go-crypt","commit_stats":null,"previous_names":["voidsnam/go-crypt","namdevel/go-crypt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/namtxs/go-crypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namtxs%2Fgo-crypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namtxs%2Fgo-crypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namtxs%2Fgo-crypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namtxs%2Fgo-crypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namtxs","download_url":"https://codeload.github.com/namtxs/go-crypt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namtxs%2Fgo-crypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35101169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"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":["aes","decryption-algorithm","encryption-decryption"],"created_at":"2026-07-03T21:06:53.894Z","updated_at":"2026-07-03T21:06:55.210Z","avatar_url":"https://github.com/namtxs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-crypt\n\n```\ngo get github.com/namdevel/go-crypt/crypto\n```\n\n### Key \u0026 String\n```go\n  plaintext := []byte(\"example plaintext\")\n  // Key for encryption and decryption\n  key := []byte(\"example key 1234\")\n```\n\n### AES Base64\n```go\n    // Encrypt plaintext to AES then encode to Hex\n    EncB64, err := crypto.EncB64(plaintext, key)\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    fmt.Printf(\"1. - AESBase64 Encrypted:%s\\n\", EncB64)\n\n    // Decrypt Base64 Cipher to AES then decode to plaintext\n    DecB64, err := crypto.DecB64(EncB64, key)\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    fmt.Printf(\"   - AESBase64 Decrypted : %s\\n\\n\", DecB64)\n```\n\n### AES Gzip Compress\n```go\n    // Encrypt plaintext to AES then encode to Gzip Compressed\n    EncGzip, err := crypto.EncGzip(plaintext, key)\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    fmt.Printf(\"2. - AESGzip Encrypted:%s\\n\", EncGzip)\n\n    // Decrypt Gzip Compressed Cipher to AES then decode to plaintext\n    DecGzip, err := crypto.DecGzip(EncGzip, key)\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    fmt.Printf(\"   - AESGzip Decrypted : %s\\n\\n\", DecGzip)\n```\n\n### AES Hex\n```go\n   // Encrypt plaintext to AES then encode to Hex\n\tEncHex, err := crypto.EncHex(plaintext, key)\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    fmt.Printf(\"3. - AESHex Encrypted:%s\\n\", EncHex)\n\n    // Decrypt Hex Cipher to AES then decode to plaintext\n    DecHex, err := crypto.DecHex(EncHex, key)\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    fmt.Printf(\"   - AESHex Decrypted : %s\\n\\n\", DecHex)\n```\n\n### Example\n```\n1. - AESBase64 Encrypted:AAAAAAAAAAAAAAAA6rZStyscF5jffw8oeBuVgeop9iPEx9z3tRbF5ZHf1Q4eXg5ZGZV1fjsufRkrrKDE\n   - AESBase64 Decrypted : example plaintext\n\n2. - AESGzip Encrypted:�E;�[pr���$�^��1�s��\u0004\u001f�������F�� �����\"�\u0013}\u0013b����\u0015����z�\u0016��\u0017�M\n   - AESGzip Decrypted : example plaintext\n\n3. - AESHex Encrypted:000000000000000000000000eab652b72b1c1798df7f0f28781b9581ea29f623c4c7dcf7b516c5e591dfd50e1e5e0e591995757e3b2e7d192baca0c4\n   - AESHex Decrypted : example plaintext\n```\n\nLicense\n------------\n\nThis open-source software is distributed under the MIT License. See LICENSE.md\n\nContributing\n------------\n\nAll kinds of contributions are welcome - code, tests, documentation, bug reports, new features, etc...\n\n* Send feedbacks.\n* Submit bug reports.\n* Write/Edit the documents.\n* Fix bugs or add new features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamtxs%2Fgo-crypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamtxs%2Fgo-crypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamtxs%2Fgo-crypt/lists"}