ByteDev.Azure.KeyVault 2.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ByteDev.Azure.KeyVault --version 2.1.0                
NuGet\Install-Package ByteDev.Azure.KeyVault -Version 2.1.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ByteDev.Azure.KeyVault" Version="2.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ByteDev.Azure.KeyVault --version 2.1.0                
#r "nuget: ByteDev.Azure.KeyVault, 2.1.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ByteDev.Azure.KeyVault as a Cake Addin
#addin nuget:?package=ByteDev.Azure.KeyVault&version=2.1.0

// Install ByteDev.Azure.KeyVault as a Cake Tool
#tool nuget:?package=ByteDev.Azure.KeyVault&version=2.1.0                

ByteDev.Azure.KeyVault

.NET Standard library providing some Azure Key Vault functionality.

Installation

ByteDev.Azure.KeyVault has been written as a .NET Standard 2.1 library and is based on the Azure.Security.KeyVault.Secrets package.

ByteDev.Azure.KeyVault is hosted as a package on nuget.org. To install from the Package Manager Console in Visual Studio run:

Install-Package ByteDev.Azure.KeyVault

Further details can be found on the nuget page.

Release Notes

Releases follow semantic versioning.

Full details of the release notes can be viewed on GitHub.

Usage

Secrets

Secrets functionality is accessed through the KeyVaultSecretClient class in namespace ByteDev.Azure.KeyVault.Secrets.

Methods:

  • DeleteAllAsync
  • DeleteAndPurgeAsync
  • DeleteAsync
  • DeleteIfExistsAsync
  • ExistsAsync
  • GetAllAsync
  • GetAsync
  • GetDeletedAsync
  • GetDeletedIfExistsAsync
  • GetIfExistsAsync
  • GetSectionAsync
  • GetValueAsync
  • GetValueIfExistsAsync
  • GetValuesIfExistsAsync
  • IsDeletedAsync
  • IsDeletedAsync
  • PurgeAllDeletedAsync
  • PurgeAsync
  • PurgeIfDeletedAsync
  • SafeSetValueAsync
  • SetValueAsync

Example usage:

IKeyVaultSecretClient client = new KeyVaultSecretClient(keyVaultUri);

// Create a secret
await client.SetValueAsync("Test1", "Some value");

// Get the secret's value
string value = await client.GetValueAsync("Test1");

// Delete the secret
await client.DeleteAsync("Test1", true);

// Purge the soft deleted secret
await client.PurgeAsync("Test1");

Keys

Keys functionality is accessed through the KeyVaultKeyClient class in namespace ByteDev.Azure.KeyVault.Keys.

Methods:

  • CreateAsync
  • DecryptAsync
  • EncryptAsync
  • GetAsync
  • SignAsync
  • UnwrapAsync
  • VerifyAsync
  • WrapAsync

Example usage:

IKeyVaultKeyClient client = new KeyVaultKeyClient(keyVaultUri);

const string clearText = "test string";

// Encrypt/decrypt some text using the Key Vault key

byte[] cipher = await client.EncryptAsync("Test1", EncryptionAlgorithm.RsaOaep, clearText, Encoding.Unicode);

string result = await client.DecryptAsync("Test1", EncryptionAlgorithm.RsaOaep, cipher, Encoding.Unicode);

// result == "test string"
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ByteDev.Azure.KeyVault:

Package Downloads
ByteDev.Testing

.NET Standard library that provides some testing related functionality.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.3.0 1,264 7/6/2022
2.2.0 423 7/5/2022
2.1.0 679 6/28/2022
2.0.0 461 3/29/2022
1.2.0 445 3/28/2022
1.1.0 347 3/31/2021
1.0.0 421 9/7/2020