Skip to content

Instantly share code, notes, and snippets.

View soondook's full-sized avatar
🏠
Working from home

soondook soondook

🏠
Working from home
View GitHub Profile
@soondook
soondook / AESDecrypt.ps1
Last active January 13, 2020 09:24 — forked from geoffgarside/AESDecrypt.ps1
Powershell Encryption, Compression, Base64 Encoding
#!/usr/bin/env powershell
param ( [String]$InputFile, [String]$OutputFile, [String]$Password="pa55w0rd" )
$InputStream = New-Object IO.FileStream($InputFile,
[IO.FileMode]::Open, [IO.FileAccess]::Read)
$OutputStream = New-Object IO.FileStream($OutputFile,
[IO.FileMode]::Create, [IO.FileAccess]::Write)
# Read the Salt
@therightstuff
therightstuff / RSAKeys.cs
Last active November 3, 2023 16:34
Import and export RSA Keys between C# and PEM format using BouncyCastle
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using System;
using System.IO;
using System.Security.Cryptography;
namespace MyProject.Data.Encryption
{
@geoffgarside
geoffgarside / AESDecrypt.ps1
Created September 14, 2017 18:04
Powershell Encryption, Compression, Base64 Encoding with C# Streams
#!/usr/bin/env powershell
param ( [String]$InputFile, [String]$OutputFile, [String]$Password="pa55w0rd" )
$InputStream = New-Object IO.FileStream($InputFile,
[IO.FileMode]::Open, [IO.FileAccess]::Read)
$OutputStream = New-Object IO.FileStream($OutputFile,
[IO.FileMode]::Create, [IO.FileAccess]::Write)
# Read the Salt
@chapter09
chapter09 / rsync.py
Created May 8, 2016 20:33
A python script for running rsync in parallel
#!/usr/bin/python
import os
import sys
import subprocess
import argparse
import re
import socket
# argv[1] host lists
# argv[2] source file/directory
@RichardHan
RichardHan / AES_sample_code
Created February 8, 2016 09:22
C# AES sample code
using System;
using System.IO;
using System.Security.Cryptography;
namespace AES
{
class Program
{
static string aes_key = "AXe8YwuIn1zxt3FPWTZFlAa14EHdPAdN9FaZ9RQWihc=";
static string aes_iv = "bsxnWolsAyO7kCfWuyrnqg==";
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace caNewtonsoftJson
{
class Person
{
public string Name { get; set; }
public int Age { get; set; }