{"id":44675400,"url":"https://github.com/dwtechnologies/kmsdecrypt","last_synced_at":"2026-02-15T03:05:16.053Z","repository":{"id":57499520,"uuid":"93747956","full_name":"dwtechnologies/kmsdecrypt","owner":"dwtechnologies","description":"Package for decrypting strings from AWS KMS. Supports decrypting ENV variables (auto or by key-names), maps, slices of string or simple strings.","archived":false,"fork":false,"pushed_at":"2022-05-10T14:07:53.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-14T05:01:44.929Z","etag":null,"topics":["aws","decrypt","kms"],"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/dwtechnologies.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-06-08T12:40:37.000Z","updated_at":"2022-05-10T14:05:56.000Z","dependencies_parsed_at":"2022-08-28T15:22:24.905Z","dependency_job_id":null,"html_url":"https://github.com/dwtechnologies/kmsdecrypt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dwtechnologies/kmsdecrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fkmsdecrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fkmsdecrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fkmsdecrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fkmsdecrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwtechnologies","download_url":"https://codeload.github.com/dwtechnologies/kmsdecrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwtechnologies%2Fkmsdecrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"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":["aws","decrypt","kms"],"created_at":"2026-02-15T03:05:15.512Z","updated_at":"2026-02-15T03:05:16.046Z","avatar_url":"https://github.com/dwtechnologies.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kmsdecrypt\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/dwtechnologies/kmsdecrypt)](https://goreportcard.com/report/github.com/dwtechnologies/kmsdecrypt)\n\nThis package can be used to quickly decrypt one or more strings using AWS KMS.\nIt also supports decrypting ENV variables automatically or based on ENV Key name.\n\n## Download\n\n`go get -u github.com/dwtechnologies/kmsdecrypt`\n\n## Functions\n\n### New\n\n    New takes AWS Region r and creates a KmsDecrypter. Returns new KmsDecrypter and error.\n\n### KmsDecrypter.DecryptEnv\n\n    DecryptEnv will return a map[string]string decrypted Key-Value pairs from ENV variables that includes the supplied Marker m in it's Key.\n    If m is an empty string it will default to \"KMS_DECRYPT\". The returned maps Key will have the marker removed from it's Key-name.\n    Returns map[string]string and error.\n\n### KmsDecrypter.DecryptEnvAuto\n\n    DecryptEnvAuto will decrypt values from ENV variables automatically. It will check that the ENV value is divisible by 4, otherwise the ENV vill be ignored.\n    Please note that any KMS decryption error will be treated as the ENV was not encrypted. So it can potentially be dangeroud, so use with causion.\n    Returns a map[string]string of decrypted Key-Value pairs.\n\n### KmsDecrypter.DecryptMap\n\n    DecryptMap will decrypt values from map[string]string m.\n    Returns a map[string]string of decrypted Key-Value pairs.\n\n### KmsDecrypter.DecryptStringSlice\n\n    DecryptStringSlice will decrypt values from []string s.\n    Returns a []string of decrypted strings.\n\n### KmsDecrypter.DecryptString\n\n    DecryptString will string s. Returns a decrypted string.\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"strings\"\n\n    \"github.com/dwtechnologies/kmsdecrypt\"\n)\n\nfunc main() {\n    // Create the decrypter for AWS Region eu-west-1\n    decrypt, err := kmsdecrypt.New(\"eu-west-1\")\n\n    // Decrypt all ENV variables that has \"KMS_DECRYPT\" in their name and return them in Key-Value map.\n    envs := decrypt.DecryptEnv(\"KMS_DECRYPT\")\n    fmt.Println(envs)\n\n    // Decrypt a slice of strings and return an decrypted slice.\n    slice := decrypt.DecryptStringSlice([]string{\"ENCRYPTED1\", \"ENCRYPTED2\", \"ENCRYPTED3\"})\n    fmt.Println(slice)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwtechnologies%2Fkmsdecrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwtechnologies%2Fkmsdecrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwtechnologies%2Fkmsdecrypt/lists"}