{"id":46146495,"url":"https://github.com/jantytgat/go-transcrypt","last_synced_at":"2026-03-02T07:32:00.994Z","repository":{"id":272169475,"uuid":"877145187","full_name":"jantytgat/go-transcrypt","owner":"jantytgat","description":"go-transcrypt provides functionality to encrypt arbitrary data into a hex encoded string for safe on-disk storage","archived":false,"fork":false,"pushed_at":"2025-11-21T13:49:51.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-21T15:28:18.165Z","etag":null,"topics":["encryption-decryption","encryption-library","golang","golang-library","golang-package","security"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/jantytgat/go-transcrypt","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/jantytgat.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-23T06:58:53.000Z","updated_at":"2025-11-21T13:47:28.000Z","dependencies_parsed_at":"2025-01-12T17:32:14.381Z","dependency_job_id":"1e23fa52-ecb3-4dff-9046-fa58642f3993","html_url":"https://github.com/jantytgat/go-transcrypt","commit_stats":null,"previous_names":["jantytgat/go-transcrypt"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jantytgat/go-transcrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantytgat%2Fgo-transcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantytgat%2Fgo-transcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantytgat%2Fgo-transcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantytgat%2Fgo-transcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jantytgat","download_url":"https://codeload.github.com/jantytgat/go-transcrypt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantytgat%2Fgo-transcrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29994999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","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":["encryption-decryption","encryption-library","golang","golang-library","golang-package","security"],"created_at":"2026-03-02T07:32:00.394Z","updated_at":"2026-03-02T07:32:00.989Z","avatar_url":"https://github.com/jantytgat.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-transcrypt\n\nThis library enables the encryption/decryption of arbitrary data into a hex-encoded string for safe on-disk storage.\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/jantytgat/go-transcrypt.svg)](https://pkg.go.dev/github.com/jantytgat/go-transcrypt)\n\n---\n\n## Basics\n\n### Add the package to your project\n\n```bash\ngo get github.com/jantytgat/go-transcrypt\n```\n\n### Import\n\nNext, you can manually add the import statement to your ```.go```-file, or have it added automatically when using it.\n\n```text\nimport github.com/jantytgat/go-transcrypt\n```\n\n### Encryption key\n\nThe encryption key is a string provide to encrypt the data with.\nA function ```CreateHexKey(bitSize int)``` is available to create a random key based on an RSA Private Key, and returns\nit as a hex-encoded string.\n\n```go\nvar err error\nvar key string\nif key, err = transcrypt.CreateHexKey(2048); err != nil {\npanic(err)\n}\n```\n\n### Salt\n\nA salt is also required for proper encryption.\nIt is possible to either generate a new salt for every call, by leaving the salt to ```nil``` when calling the ``\nEncrypt``` function.\nIf you want to use a specific salt, you can either provide it manually (at least 12 bytes) or generate one.\n\n```go\nvar salt []byte\nif salt, err = transcrypt.CreateSalt(); err != nil {\npanic(err)\n}\n```\n\n## Operations\n\nCurrently, the following data types are supported for encryption:\n\n- string\n- int\n\n### Encrypt\n\n```go\nvar inputString = \"hello world\"\nvar encryptedString string\nif encryptedString, err = transcrypt.Encrypt(key, salt, transcrypt.AES_256_GCM, inputString); err != nil {\npanic(err)\n}\n```\n\n### Decrypt\n\n```go\nvar decryptedString any\nif decryptedString, err = transcrypt.Decrypt(key, encryptedString); err != nil {\npanic(err)\n}\n```\n\n## Example\n\nAn example is available in the [examples](https://github.com/jantytgat/go-transcrypt/tree/main/examples/simple)\ndirectory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjantytgat%2Fgo-transcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjantytgat%2Fgo-transcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjantytgat%2Fgo-transcrypt/lists"}