{"id":24524195,"url":"https://github.com/bytedev/bytedev.azure.keyvault","last_synced_at":"2026-04-30T03:36:18.148Z","repository":{"id":43050590,"uuid":"293683086","full_name":"ByteDev/ByteDev.Azure.KeyVault","owner":"ByteDev","description":".NET Standard library providing some Azure Key Vault functionality.","archived":false,"fork":false,"pushed_at":"2022-09-20T07:59:20.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-31T08:22:00.379Z","etag":null,"topics":["azure","csharp","keyvault"],"latest_commit_sha":null,"homepage":"","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/ByteDev.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-09-08T02:43:46.000Z","updated_at":"2022-03-28T09:20:06.000Z","dependencies_parsed_at":"2023-01-18T15:45:39.243Z","dependency_job_id":null,"html_url":"https://github.com/ByteDev/ByteDev.Azure.KeyVault","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ByteDev/ByteDev.Azure.KeyVault","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteDev%2FByteDev.Azure.KeyVault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteDev%2FByteDev.Azure.KeyVault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteDev%2FByteDev.Azure.KeyVault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteDev%2FByteDev.Azure.KeyVault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ByteDev","download_url":"https://codeload.github.com/ByteDev/ByteDev.Azure.KeyVault/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ByteDev%2FByteDev.Azure.KeyVault/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261735005,"owners_count":23201939,"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":["azure","csharp","keyvault"],"created_at":"2025-01-22T04:18:48.188Z","updated_at":"2026-04-30T03:36:12.586Z","avatar_url":"https://github.com/ByteDev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/github/bytedev/ByteDev.Azure.KeyVault?branch=master\u0026svg=true)](https://ci.appveyor.com/project/bytedev/ByteDev-Azure-KeyVault/branch/master)\n[![NuGet Package](https://img.shields.io/nuget/v/ByteDev.Azure.KeyVault.svg)](https://www.nuget.org/packages/ByteDev.Azure.KeyVault)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/ByteDev/ByteDev.Azure.KeyVault/blob/master/LICENSE)\n\n# ByteDev.Azure.KeyVault\n\n.NET Standard library that provides some extended Azure Key Vault functionality build on top of the official Azure packages.\n\n## Installation\n\nByteDev.Azure.KeyVault has been written as a .NET Standard 2.1 library.\n\nByteDev.Azure.KeyVault is hosted as a package on nuget.org.  To install from the Package Manager Console in Visual Studio run:\n\n`Install-Package ByteDev.Azure.KeyVault`\n\nFurther details can be found on the [nuget page](https://www.nuget.org/packages/ByteDev.Azure.KeyVault/).\n\n## Release Notes\n\nReleases follow semantic versioning.\n\nFull details of the release notes can be viewed on [GitHub](https://github.com/ByteDev/ByteDev.Azure.KeyVault/blob/master/docs/RELEASE-NOTES.md).\n\n## Usage\n\n### Secrets\n\nSecrets functionality is accessed through the `KeyVaultSecretClient` class.\n\nMethods:\n\n- DeleteAllAsync\n- DeleteAndPurgeAsync\n- DeleteAsync\n- DeleteIfExistsAsync\n- ExistsAsync\n- GetAllAsync\n- GetAsync\n- GetDeletedAsync\n- GetDeletedIfExistsAsync\n- GetIfExistsAsync\n- GetSectionAsync\n- GetValueAsync\n- GetValueIfExistsAsync\n- GetValuesIfExistsAsync\n- IsDeletedAsync\n- PurgeAllDeletedAsync\n- PurgeAsync\n- PurgeIfDeletedAsync\n- SafeSetValueAsync\n- SetValueAsync\n\nExample usage:\n\n```csharp\nusing ByteDev.Azure.KeyVault.Secrets;\n\n// ...\n\nIKeyVaultSecretClient client = new KeyVaultSecretClient(keyVaultUri);\n\n// Create a secret\nawait client.SetValueAsync(\"Test1\", \"Some value\");\n\n// Get the secret's value\nstring value = await client.GetValueAsync(\"Test1\");\n\n// Delete the secret\nawait client.DeleteAsync(\"Test1\", true);\n\n// Purge the soft deleted secret\nawait client.PurgeAsync(\"Test1\");\n```\n\n---\n\n### Secrets.Serialization\n\nDeserialize Azure Key Vault secrets directly to a new class instance.\n\n```csharp\n// Entitiy class (class you want to deserialize to)\n\npublic class Person\n{\n    public string Name { get; set; }\n\n    [KeyVaultSecretName(\"email\")]\n    public string EmailAddress { get; set; }\n\n    [KeyVaultSecretIgnore]\n    public string Mobile { get; set; }\n}\n```\n\nThe class above will check Azure Key Vault for the following named secrets:\n- `Name`\n- `email`\n\nThe `Mobile` property will not be set on deserialization as it has been decorated with a `KeyVaultSecretIgnoreAttribute`.\n\n```csharp\nusing ByteDev.Azure.KeyVault.Secrets;\nusing ByteDev.Azure.KeyVault.Secrets.Serialization;\n\n// ...\n\nIKeyVaultSecretClient client = new KeyVaultSecretClient(keyVaultUri);\n\nIKeyVaultSecretSerializer serializer = new KeyVaultSecretSerializer(client);\n\nvar person = await serializer.DeserializeAsync\u003cPerson\u003e();\n\n// person.Name == (Value of \"Name\" secret)\n// person.EmailAddress == (Value of \"email\" secret)\n// person.Mobile == null\n```\n\n---\n\n### Keys\n\nKeys functionality is accessed through the `KeyVaultKeyClient` class.\n\nMethods:\n\n- CreateAsync\n- DeleteAsync\n- DeleteIfExistsAsync\n- EncryptAsync / DecryptAsync\n- ExistsAsync\n- GetAsync\n- PurgeAsync\n- PurgeIfDeletedAsync\n- SignAsync / VerifyAsync\n- WrapAsync / UnwrapAsync\n\nExample usage:\n\n```csharp\nusing ByteDev.Azure.KeyVault.Keys;\n\n// ...\n\nIKeyVaultKeyClient client = new KeyVaultKeyClient(keyVaultUri);\n\nconst string keyName = \"MyKey\";\nconst string clearText = \"test string\";\n\n// Encrypt/decrypt some text using the Key Vault key\n\nbyte[] cipher = await client.EncryptAsync(keyName, EncryptionAlgorithm.RsaOaep, clearText, Encoding.Unicode);\n\nstring result = await client.DecryptAsync(keyName, EncryptionAlgorithm.RsaOaep, cipher, Encoding.Unicode);\n\n// result == \"test string\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytedev%2Fbytedev.azure.keyvault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytedev%2Fbytedev.azure.keyvault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytedev%2Fbytedev.azure.keyvault/lists"}