private void ReadHeaderLine() { // find first line of armor string input; while ((input = ReadLineFromInputStream()) != null) { if (ArmorHelper.IsAsciiArmorHeaderLine(input)) { return; } } throw new PGPException("Unable to locate beginning of ASCII armor"); }
private void ReadHeaders() { string input; while ((input = ReadLineFromInputStream()) != null) { input = input.TrimEnd(); if (input.Length == 0) { return; // blank line ends headers } var header = ArmorHelper.ParseHeader(input); if (header != null) { AddHeader(header.Name, header.Value); } else { throw new PGPException(string.Format(CultureInfo.CurrentCulture, "Malformed header on line {0}", _LineNumber)); } } }