static void EncodeDkimLongValue (FormatOptions format, StringBuilder encoded, ref int lineLength, string value)
{
int startIndex = 0;
do {
int lineLeft = format.MaxLineLength - lineLength;
int index = Math.Min (startIndex + lineLeft, value.Length);
encoded.Append (value.Substring (startIndex, index - startIndex));
lineLength += (index - startIndex);
if (index == value.Length)
break;
encoded.Append (format.NewLine);
encoded.Append ('\t');
lineLength = 1;
startIndex = index;
} while (true);
}