private static bool FindMD5Hash(URN urn) { return(FindHashType(urn, G2Hash.MD5)); }
private static bool FindSHA1Hash(URN urn) { return(FindHashType(urn, G2Hash.SHA1)); }
public override int ReadPayload(MemoryStream stream,int length) { this.urn = URN.ReadURN(stream,length); //Debug.Assert (urn.Size == length, "G2PacketURN ReadPayload length " + urn.Size + " vs " + length + " supposed ( urn type " + urn.HashAlgo + " )"); return urn.Size; }
private static bool FindED2KHash(URN urn) { return(FindHashType(urn, G2Hash.ED2K)); }
public G2PacketURN(URN u) : base() { this.type = G2PacketType.URN; this.urn = u; }
private static bool FindMD5Hash(URN urn) { return FindHashType(urn,G2Hash.MD5); }
private static bool FindHashType(URN urn, string type) { if (urn.HashAlgo.Equals (type)) return true; return false; }
private static bool FindED2KHash(URN urn) { return FindHashType(urn,G2Hash.ED2K); }
private static bool FindSHA1Hash(URN urn) { return FindHashType(urn,G2Hash.SHA1); }