Skip to content

{ Monthly Archives } May 2007

Quick and Easy MD5 in C#

using System; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; namespace SomeRandomNamespace { class Utils { public static string md5(string strToHash) { MD5CryptoServiceProvider crypt = new MD5CryptoServiceProvider(); byte[] bytes = Encoding.UTF8.GetBytes(strToHash); bytes = crypt.ComputeHash(bytes); System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach (byte b in bytes) { sb.Append(b.ToString(“x2”).ToLower()); } return sb.ToString(); } } }

Floating an Adsense Ad

Here’s how to make an adsense ad float (or anything float for that matter) so the user can not scroll it off of the page. <td width=”160″ align=”left”> <div style=”position:fixed; text-align:center”> PUT YOUR ADSENSE SCRIPT HERE </div> </td>

Amazon S3 queryStringPut

One of the applications I am working on uses Amazon Simple Storage Solution as its storage architecture for potentially billions of files. Because I am working on a widely distributed client application that can not contain our private S3 key, I have a web service on my own server set up that will create Query […]