Posts

Generate Random AES Encryption Key

Image
I was looking for a way to quickly generate a random AES key online, but couldn't find anything. I looked into a couple methods using JavaScript, but determined that a C# solution would be better. I needed to base64 encode the key array to store that value in a config file. Here's the code I ended up with: https://gist.github.com/aaronhoffman/09b56f77a95205fe10365bde2f4a02e5 UPDATE Using Visual Studio's "C# Interactive" screen you can generate a key in a single line: var keyArray = new byte[32]; (new System.Security.Cryptography.RNGCryptoServiceProvider()).GetBytes(keyArray); Convert.ToBase64String(keyArray) Hope this helps! -Aaron

Sync Gmail Contacts Between Accounts

Image
For the last few years I've needed a way to easily sync contacts between gmail accounts. The only method previously supported by Google is to export to csv then re-import the contact list . This may work for some, but clearly there is a desire for something else. I finally found some time to dig into the Google Contact APIs  and created a site to perform this sync operation easily, without needing to install any software: https://www.mycontactsync.com/ Steps to sync:  1. Authorize your gmail account  2. Link an second gmail account (up to 5 currently)  3. Compare two accounts to see which email addresses and phone numbers will be created.  4. Click the Sync Accounts button to initiate the sync! It's that easy! Hope this helps, Aaron links: product hunt note: this website was previously named "gmail contacts sync". The name was changed to verify the google api use.