Skip to content

Instantly share code, notes, and snippets.

View scottrudy's full-sized avatar

Scott scottrudy

  • Maryland
View GitHub Profile
@scottrudy
scottrudy / Program.cs
Created July 29, 2022 17:57
Example of AES-256-CBC encryption and decryption functions, which use a shared key and a SHA-256 HMAC, that works across .NET (tested on 6) and Node (tested on 16.16).
using System.Security.Cryptography;
using System.Text;
internal class Program
{
private static async Task Main(string[] args)
{
var passKey = "0102030405060708091011121314151617181920212223242526272829303132"; // some 64 character hex string (32 bytes)
var testString = "Hello, World! How are you today? I am doing fine and thought I would drop you a line and say hello, because you're pretty cool.";
var encryptedString = await EncryptAsync(testString, passKey).ConfigureAwait(false);
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@scottrudy
scottrudy / gitflow-breakdown.md
Created January 6, 2017 23:36 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@scottrudy
scottrudy / npm-debug.log
Created November 2, 2016 18:22
Error when trying to search in npm
> type npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\scrudy\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'search',
1 verbose cli 'angular' ]
2 info using npm@3.10.9
3 info using node@v6.9.1
4 verbose config Skipping project config: C:\Users\scrudy/.npmrc. (matches userconfig)
5 silly mapToRegistry name -/all