Exemplo n.º 1
0
 private static bool FindMD5Hash(URN urn)
 {
     return(FindHashType(urn, G2Hash.MD5));
 }
Exemplo n.º 2
0
 private static bool FindSHA1Hash(URN urn)
 {
     return(FindHashType(urn, G2Hash.SHA1));
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 private static bool FindED2KHash(URN urn)
 {
     return(FindHashType(urn, G2Hash.ED2K));
 }
Exemplo n.º 5
0
 public G2PacketURN(URN u)
     : base()
 {
     this.type = G2PacketType.URN;
     this.urn = u;
 }
Exemplo n.º 6
0
 private static bool FindMD5Hash(URN urn)
 {
     return FindHashType(urn,G2Hash.MD5);
 }
Exemplo n.º 7
0
 private static bool FindHashType(URN urn, string type)
 {
     if (urn.HashAlgo.Equals (type))
         return true;
     return false;
 }
Exemplo n.º 8
0
 private static bool FindED2KHash(URN urn)
 {
     return FindHashType(urn,G2Hash.ED2K);
 }
Exemplo n.º 9
0
 private static bool FindSHA1Hash(URN urn)
 {
     return FindHashType(urn,G2Hash.SHA1);
 }