{"id":19385352,"url":"https://github.com/mookid8000/permitski","last_synced_at":"2026-02-11T16:02:15.651Z","repository":{"id":37994038,"uuid":"186965147","full_name":"mookid8000/Permitski","owner":"mookid8000","description":":necktie: Signature thing","archived":false,"fork":false,"pushed_at":"2024-12-13T08:39:44.000Z","size":1971,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T20:44:44.789Z","etag":null,"topics":["license-checking","sign-documents","signer"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mookid8000.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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-05-16T06:28:00.000Z","updated_at":"2024-12-13T08:39:20.000Z","dependencies_parsed_at":"2024-05-17T13:55:20.369Z","dependency_job_id":"18030a93-2a01-44c6-a9e3-7bbcc8b2bded","html_url":"https://github.com/mookid8000/Permitski","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mookid8000%2FPermitski","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mookid8000%2FPermitski/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mookid8000%2FPermitski/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mookid8000%2FPermitski/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mookid8000","download_url":"https://codeload.github.com/mookid8000/Permitski/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250527063,"owners_count":21445293,"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":["license-checking","sign-documents","signer"],"created_at":"2024-11-10T09:35:58.379Z","updated_at":"2026-02-11T16:02:15.580Z","avatar_url":"https://github.com/mookid8000.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Permitski\n\nA simple .NET library for generating crypgraphically signed documents.\n\nFirst you generate a key\n\n```csharp\nvar key = DocumentSigner.GenerateKey();\n```\n\nwhich you might want to hold on to, because it's your secret. \n\nIf you lose the key, you lose the ability to sign documents and validate signatures of signed documents, so you can probably imagine that it's pretty important.\n\nWith the key in hand, you can create a signer like this:\n```csharp\nusing(var signer = new DocumentSigner(key))\n{\n\t// sign \u0026 validate stuff in here\n}\n```\n\nSince it's relying on unmanaged resources some place deep within the bowels of the .NET framework, you want to make sure that you dispose the signer properly.\n\nNow, let's pretend we have some important data we want to pass around with a signature, so we can validate its authenticity later on. Here's the class that represents our important data:\n\n```csharp\nclass ImportantData\n{\n    public string Data { get; }\n\n    public ImportantData(string data)\n    {\n        Data = data;\n    }\n}\n```\n\nLet's sign it, so we can give it to someone:\n```csharp\nvar importantData = new ImportantData(\"hemmelig\");\n\nvar signed = signer.Sign(importantData);\n\nConsole.WriteLine(signed);\n```\n\nwhich in this case yielded the following output:\n\n```json\n{\n  \"Document\": {\n    \"Data\": \"hemmelig\"\n  },\n  \"Signature\": \"YHZxo95/CfP4P/ndfh+49m5kmjb2Zj8xkGrkvKVFbcw=\"\n}\n```\n\nLet's see if it's valid - if we store the JSON shown above in a string called `json`, we can check its validity like this:\n\n```csharp\nConsole.WriteLine($\"The document is valid: {signer.IsValid(json)}\");\n```\nwhich on my machine yielded:\n```\nThe document is valid: True\n```\n\nNeat!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmookid8000%2Fpermitski","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmookid8000%2Fpermitski","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmookid8000%2Fpermitski/lists"}