This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
namespace CryptographyInDotNet | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
const string password = "V3ryC0mpl3xP455w0rd"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Security.Cryptography; | |
namespace CryptographyInDotNet | |
{ | |
public class HashData | |
{ | |
public static byte[] ComputeHashSha1(byte[] toBeHashed) | |
{ | |
using (var sha1 = SHA1.Create()) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Security.Cryptography; | |
namespace CryptographyInDotNet | |
{ | |
public class Hmac | |
{ | |
private const int KeySize = 32; | |
public static byte[] GenerateKey() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
choco feature enable --name allowGlobalConfirmation | |
cinst <pkg|packages.config> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"labName": { | |
"type": "string", | |
"metadata": { | |
"description": "The name of the new lab instance to be created" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration DevMachine | |
{ | |
Import-DscResource -ModuleName PSDesiredStateConfiguration | |
Import-DscResource -ModuleName cChoco | |
Node 'Dev' | |
{ | |
#Set-NetConnectionProfile -InterfaceIndex <index number> -NetworkCategory Private | |
#set-DscLocalConfigurationManager | |
#winrm quickconfig -quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.IdentityModel.Clients.ActiveDirectory; | |
using System; | |
using System.Configuration; | |
using System.Globalization; | |
using System.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
namespace ApiAuthClient | |
{ |
NewerOlder