예제 #1
0
 public static string RandomString(int length = -1)
 {
     if (length < 0)
     {
         length = Random.Next(3, 10);
     }
     return(ConversionHelpers.ToTokenString(RandomByteArray(length), length));
 }
예제 #2
0
 public static bool QuickCheck(byte[] result, int totalLength, string begin)
 {
     return(result.Length == totalLength && ConversionHelpers.ToUTF8String(ByteArrayHelpers.CopyPartOf(result, 0, begin.Length)) == begin);
 }