Programming

Cryptographically Secure Random Number

Cryptographically Secure Random Number In a similar vein to my attempt to generate a cryptographically secure random string I also wanted to be able to create cryptographically secure random numbers. The below function is based on the answer from Markus Olsson to the stackoverflow question here. public static int GetRandomInteger(int Read more…

By Shinigami, ago
Programming

Pre-Populating Social Sharing Messages

Pre-Populating Social Sharing Messages Sharing buttons on a site can be configured to pre-populate content through various sharing channels such as email, Facebook and Twitter, though unfortunately this doesn’t seem to be that well documented. The below examples show how to pre-compose a message to be sent by Outlook.com, Yahoo, Read more…

By Shinigami, ago
Programming

Cryptographically Secure Random String

Cryptographically Secure Random String I’ve been trying to generate unique referal codes composed of uppercase letters for a project and although it’s not really necessary I wanted to make these as cryptographically sound as possible so I could reuse the code later in a personal password generator project. Turns out Read more…

By Shinigami, ago
Programming

Retrieving OAUTH2 Tokens in .NET

Retrieving OAUTH2 Tokens in .NET To get access tokens from an OAUTH2 identity server you can make a standard POST request using HttpClient, the easiest way of sending the required credentials is by serializing a dictionary object of values into URL encoded content. Token Class public class Token { public Read more…

By Shinigami, ago