This file contains hidden or 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
# Generate a new pgp key: | |
gpg --full-generate-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# Check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# Export public key in gpg: | |
gpg --armor --export ER34512P9 | |
# Your key id is the HASH in front of `sec` in previous command - looks a bit like "ER34512P9" or something like that. |
This file contains hidden or 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.IO; | |
using System.Xml; | |
using System.Text; | |
using System.Security.Cryptography; | |
using Org.BouncyCastle.Pkcs; | |
using Org.BouncyCastle.X509; | |
using Org.BouncyCastle.OpenSsl; |