Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
public static string MD5Hash(string toHash) | |
{ | |
string hashed; | |
using (MD5 md5 = MD5.Create()) | |
{ | |
hashed = string.Join(string.Empty, md5.ComputeHash(Encoding.UTF8.GetBytes(toHash)).Select(b => b.ToString("x2"))); | |
} | |
return hashed; |
using System; | |
using System.Diagnostics; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Crtypto | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
ul.tree, ul.tree ul { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
ul.tree ul { | |
margin-left: 10px; | |
} | |
ul.tree li { | |
margin: 0; |
X509Certificate2 cert = new X509Certificate2(@"KEY.pfx", "pfxPassword", X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet); | |
RSACryptoServiceProvider provider = (RSACryptoServiceProvider) cert.PrivateKey; | |
byte[] array = provider.ExportCspBlob(!provider.PublicOnly); | |
using (FileStream fs = new FileStream("FileName.snk", FileMode.Create, FileAccess.Write)) | |
{ | |
fs.Write(array, 0, array.Length); | |
} |
#!/bin/bash | |
# Calculates network and broadcast based on supplied ip address and netmask | |
# Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0 | |
# Usage: broadcast_calc.sh 192.168.0.1/24 | |
tonum() { | |
if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json
file in /etc/docker
:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}