public byte[] GenerateNonce(Int32 length = 8)
{
// set the random seed
var seed = m_validNonceChars.Count();
var result = String.Empty;
// construct the nonce from characters randomly selected from the permissible characters
for (int i = 0; i < length; i++)
{
result += m_validNonceChars[m_random.Next(0, seed)].ToString(CultureInfo.InvariantCulture);
}
// convert the results to an ASCII encoded byte[] and return it.
return Encoding.ASCII.GetBytes(result);
}