Using system;
Using system. Security. cryptography;
Namespace arli. commonprj
...{
Public class getmd5
...{
Public getmd5 ()
...{
}
/** // Return the MD5 Value
/// String of the MD5 value to be converted
Public String getof (string mystring )...{
MD5 MD5 = new md5cryptoserviceprovider ();
Byte [] fromdata = system. Text. encoding. Unicode. getbytes (mystring );
Byte [] targetdata = md5.computehash (fromdata );
String byte2string = NULL;
For (INT I = 0; I "X ");
}
Return byte2string;
}
/** // Return the MD5 Value
/// String of the MD5 value to be converted
/// Delimiter
Public String getof (string mystring, string splitchar )...{
MD5 MD5 = new md5cryptoserviceprovider ();
Byte [] fromdata = system. Text. encoding. Unicode. getbytes (mystring );
Byte [] targetdata = md5.computehash (fromdata );
String byte2string = NULL;
For (INT I = 0; I "X") + splitchar;
}
If (splitchar! = NULL & splitchar! = "")...{
Return byte2string. Remove (byte2string. Length-1, 1 );
}
Return byte2string;
}
/** // Return the MD5 Value
/// String of the MD5 value to be converted
/// Delimiter
Public String getof (string mystring, char splitchar )...{
MD5 MD5 = new md5cryptoserviceprovider ();
Byte [] fromdata = system. Text. encoding. Unicode. getbytes (mystring );
Byte [] targetdata = md5.computehash (fromdata );
String byte2string = NULL;
For (INT I = 0; I "X") + splitchar;
}
Return byte2string. Remove (byte2string. Length-1, 1 );
}
}
}