{"id":23408846,"url":"https://github.com/integrativesoft/crossprotecteddata","last_synced_at":"2025-04-11T23:52:59.252Z","repository":{"id":47712160,"uuid":"233115291","full_name":"integrativesoft/CrossProtectedData","owner":"integrativesoft","description":"A DataProtect wrapper that uses DPAPI in Windows and AspNetCore.DataProtection in other platforms.","archived":false,"fork":false,"pushed_at":"2022-12-24T20:27:31.000Z","size":178,"stargazers_count":18,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T23:52:54.098Z","etag":null,"topics":["cryptography","csharp","dpapi","encryption","protected-data"],"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/integrativesoft.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":"2020-01-10T19:20:45.000Z","updated_at":"2024-12-02T18:59:58.000Z","dependencies_parsed_at":"2023-01-30T21:10:14.127Z","dependency_job_id":null,"html_url":"https://github.com/integrativesoft/CrossProtectedData","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2FCrossProtectedData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2FCrossProtectedData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2FCrossProtectedData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/integrativesoft%2FCrossProtectedData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/integrativesoft","download_url":"https://codeload.github.com/integrativesoft/CrossProtectedData/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497851,"owners_count":21113984,"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":["cryptography","csharp","dpapi","encryption","protected-data"],"created_at":"2024-12-22T15:17:42.964Z","updated_at":"2025-04-11T23:52:59.232Z","avatar_url":"https://github.com/integrativesoft.png","language":"C#","readme":"# CrossProtectedData ![Download count](https://img.shields.io/nuget/dt/Integrative.CrossProtect.svg)\n\nA replacement for the `ProtectedData` class in NET Standard that works not only in Windows but also Linux/MacOS/others.\n\nThis library is a wrapper of `ProtectedData` and exposes the same interface. The difference is the following:\n- When running in Windows, it calls directly the original ProtectedData class supported in Windows.\n- When running in non-Windows, it implements those calls using instead the AspNetCore.DataProtection library.\n\nThere is no need to download this repository. This library is available as a [NuGet package](https://www.nuget.org/packages/Integrative.CrossProtect/).\n# Example\n\n```csharp\nusing Integrative.Encryption;\nusing System;\nusing System.Security.Cryptography;\nusing System.Text;\n\nnamespace CrossProtectedExample\n{\n    class Program\n    {\n        static void Main(string[] args)\n        {\n            // our text to protect\n            var text = \"Hello!\";\n\n            // get bytes from text\n            var bytes = Encoding.UTF8.GetBytes(text);\n\n            // optional entropy\n            var entropy = new byte[] { 100, 25, 31, 213 };\n\n            // protect (encrypt)\n            var protectedBytes = CrossProtect.Protect(bytes, entropy,\n                DataProtectionScope.CurrentUser);\n\n            // unprotect (decrypt)\n            var unprotected = CrossProtect.Unprotect(protectedBytes, entropy,\n                DataProtectionScope.CurrentUser);\n\n            // convert bytes back to text\n            var result = Encoding.UTF8.GetString(unprotected);\n\n            // print result\n            Console.WriteLine(result);\n            Console.ReadKey();\n        }\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegrativesoft%2Fcrossprotecteddata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintegrativesoft%2Fcrossprotecteddata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegrativesoft%2Fcrossprotecteddata/lists"}