CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Base32
C#
static string base36Chars = "0123456789abcdefghijklmnopqrstuvwxyz";
static char[] base36CharArray = base36Chars.ToCharArray();            
 
 
/// <summary>
/// Encodes an integer into a string by mapping to alpha and digits (36 chars)
/// chars are embedded as lower case
/// 
/// Example: 4zx12ss
/// </summary>
by Rick Strahl   December 23, 2009 @ 7:28pm
Tags: Base32
675 Views
no comments
 
C#
private static String base32Chars = "ybndrfg8ejkmcpqxot1uwisza345h769";
 
private void Test()
{
          RandomNumberGenerator rng = RandomNumberGenerator.Create();
          byte[] randomBytes = new byte[7];
          string uniqueID = string.Empty;
          uniqueID = Base32Encode(randomBytes);
}
by Tony Abell   August 14, 2009 @ 11:27am
454 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate