{"id":20497953,"url":"https://github.com/billgraziano/dpapi","last_synced_at":"2025-10-08T09:07:18.945Z","repository":{"id":144201312,"uuid":"214823402","full_name":"billgraziano/dpapi","owner":"billgraziano","description":"GO Wrapper for Windows DPAPI","archived":false,"fork":false,"pushed_at":"2025-01-31T14:56:59.000Z","size":21,"stargazers_count":28,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T09:22:13.955Z","etag":null,"topics":["dpapi","go","golang","windows"],"latest_commit_sha":null,"homepage":"","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/billgraziano.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}},"created_at":"2019-10-13T13:17:13.000Z","updated_at":"2025-03-04T22:41:56.000Z","dependencies_parsed_at":"2025-01-31T15:42:16.407Z","dependency_job_id":null,"html_url":"https://github.com/billgraziano/dpapi","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billgraziano%2Fdpapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billgraziano%2Fdpapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billgraziano%2Fdpapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billgraziano%2Fdpapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/billgraziano","download_url":"https://codeload.github.com/billgraziano/dpapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248764376,"owners_count":21158074,"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","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":["dpapi","go","golang","windows"],"created_at":"2024-11-15T18:12:35.421Z","updated_at":"2025-10-08T09:07:18.829Z","avatar_url":"https://github.com/billgraziano.png","language":"Go","readme":"# GO Windows DPAPI Wrapper\n\nThe Windows DPAPI uses keys from the user and computer to encrypt data.\n\nEncrypt and decrypt strings:\n\n```\npwd := \"password\"\nencrypted, _ := dpapi.Encrypt(pwd)\ndecrypted, _ := dpapi.Decrypt(encrypted)\n```\n\nEncrypt and decrypt byte arrays:\n\n```\nsecret := []byte(\"isolateIndoors\")\nenc, _ := dpapi.EncryptBytes(secret)\ndec, _ := dpapi.DecryptBytes(enc)\n```\n\nAn encrypted string looks like this: \n\nAQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAAQ5GMbx570mklMuNAyFRhgAAAAACAAAAAAAQZgAAAAEAACAAAACe7tibTHuzIsKVO2adNjiXU9TM9F1eR95Yk0Wk8Kzj7gAAAAAOgAAAAAIAACAAAAA7quouOuNvn7eicqjE9aa75UZN+TAbokD35hTXbE7UOBAAAADEFNscRxOqxxheOIVdtbiQQAAAAC+UCYzQFtF7uRyhjXKnqCii8OHUtmB5LwIgJTx46uLukKGsOp60rGVPGn6ufiYYCRXiCQPAmQEKjsEE1jwqZto=\n\nThe package also supports machine specific encryption and encryption using entropy.\n\nDeveloping\n----------\nThere is an application in `/cmd/stable` that creates a JSON file of encrypted values.  The purpose is to create a stable encrypted value and then verify it can still be decrypted after any changes are made.\n\nIt creates a file named `domain.computer.user.stable.json` on the first run.  On subsequent runs it tries to decrypt the values in the JSON file.  It currently only tests per-user encryption.  But this should allow testing of machine encryption and encryption with entropy.\n\n\nReferences\n----------\n\n* [Data Protection API](https://en.wikipedia.org/wiki/Data_Protection_API) (wikipedia.org)\n* [Windows Data Protection](https://docs.microsoft.com/en-us/previous-versions/ms995355(v=msdn.10)?redirectedfrom=MSDN) (microsoft.com)\n* [Troubleshooting the DPAPI](https://support.microsoft.com/en-us/help/309408/how-to-troubleshoot-the-data-protection-api-dpapi) (microsoft.com)\n* [CryptProtectData function](https://docs.microsoft.com/en-us/windows/win32/api/dpapi/nf-dpapi-cryptprotectdata) (microsoft.com)\n* [Example C Program: Using CryptProtectData](https://docs.microsoft.com/en-us/windows/win32/seccrypto/example-c-program-using-cryptprotectdata) (microsoft.com)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillgraziano%2Fdpapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbillgraziano%2Fdpapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbillgraziano%2Fdpapi/lists"}