KhaledJemni / AzureKeyVault

How to use Azure Key Vault in and ASP.NET Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AzureKeyVault

How to use Azure Key Vault in and ASP.NET Project

  • Creating Key Vault sur Azure, in which you store a symmetric key AES 256. 1

2

  • Creating a self-signed certificate with powershell (this one was created with a wild card *cloudapp.net) , with public and private key RSA 2048.

3

  • Creating the web app on Azure

4

  • Get the APP ID from the portal ( I did it from the old one but you can do it form the new one I just did know how at that time )

5

  • Ensuite j’ai créé un projet ASP.NET MVC sur Visual Studio pour développer les API, la première chose à effectuer c’est d’ajouter les Keys sur Web.Config récupéré du KeyVault sur le portail.

6

  • Give permissions to key

7

  • adding C# classes Aes256Encryption, Rsa2048Encryption for encryption and decryption.

  • You will find 4 methods to:

Symetric Encryption :

8

Symetric Decryption

9

Asymetric Encyprtion:

10

Asymetric Decryption:

11

About

How to use Azure Key Vault in and ASP.NET Project


Languages

Language:C# 90.7%Language:JavaScript 5.4%Language:HTML 2.5%Language:CSS 1.3%Language:ASP 0.1%