protected static Address NoCacheParse(string ascii) {
string[] parts = ascii.Split(':');
//It should be: urn:brunet:node:[encoded address]
// or brunet:node:[encoded address]
int offset = 0;
if (parts[0].ToLower() == "urn") {
offset = 1;
}
string brunet = parts[offset].ToLower();
if (brunet != "brunet")
{
throw new ParseException
("String is not a properly formated Brunet Address:" + ascii);
}
string node = parts[offset + 1].ToLower();
if (node != "node") {
throw new ParseException
("String is not a properly formated Brunet Address:" + ascii);
}
try {
byte[] binadd = Base32.Decode(parts[offset + 2]);
MemBlock mb = MemBlock.Reference(binadd);
return Parse(mb);
}
catch(System.ArgumentOutOfRangeException ex) {
throw new ParseException("Failed to parse Address string",
ex);
}
}
/**