|
| |||||||
![]() | Welcome to iWEBTOOL Talk, where you talk about
webmaster-related stuff.
1 Register
2 Browse the board
3 Discuss whatever may interest you! | |||||||||||||
![]() |
| | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| Newcomer Join Date: Jun 2007
Posts: 6
![]() | /// <summary> /// Thsi method retrieve the string to encrypt from the Presentation Layer /// And return the Encrypted String /// </summary> /// <param name="str"></param> /// <returns></returns> public string encryptPassword(string strText) { return Encrypt(strText, "&%#@?,:*"); } /// <summary> /// This method retrieve the encrypted string to decrypt from the Presentation Layer /// And return the decrypted string /// </summary> /// <param name="str"></param> /// <returns></returns> public string decryptPassword(string str) { return Decrypt(str, "&%#@?,:*"); } /// <summary> /// This method has been used to get the Encrypetd string for the /// passed string /// </summary> /// <param name="strText"></param> /// <param name="strEncrypt"></param> /// <returns></returns> private string Encrypt(string strText, string strEncrypt) { byte[] byKey = new byte[20]; byte[] dv ={ 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; try { byKey = System.Text.Encoding.UTF8.GetBytes(strEncrypt.Subs tring(0, 8)); DESCryptoServiceProvider des = new DESCryptoServiceProvider(); byte[] inputArray = System.Text.Encoding.UTF8.GetBytes(strText); MemoryStream ms = new MemoryStream(); CryptoStream cs = new CryptoStream(ms, des.CreateEncryptor(byKey, dv), CryptoStreamMode.Write); cs.Write(inputArray, 0, inputArray.Length); cs.FlushFinalBlock(); return Convert.ToBase64String(ms.ToArray()); } catch (Exception ex) { throw ex; } } /// <summary> /// This method has been used to Decrypt the Encrypted String /// </summary> /// <param name="strText"></param> /// http://www.hanusoftware.com /// <param name="strEncrypt"></param> /// <returns></returns> private string Decrypt(string strText, string strEncrypt) { byte[] bKey = new byte[20]; byte[] IV = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF }; try { bKey = System.Text.Encoding.UTF8.GetBytes(strEncrypt.Subs tring(0, 8)); DESCryptoServiceProvider des = new DESCryptoServiceProvider(); Byte[] inputByteArray = inputByteArray = Convert.FromBase64String(strText); MemoryStream ms = new MemoryStream(); CryptoStream cs = new CryptoStream(ms, des.CreateDecryptor(bKey, IV), CryptoStreamMode.Write); cs.Write(inputByteArray, 0, inputByteArray.Length); cs.FlushFinalBlock(); System.Text.Encoding encoding = System.Text.Encoding.UTF8; return encoding.GetString(ms.ToArray()); } catch (Exception ex) { throw ex; } } http://www.hanusofware.com |
| |
|
| |||||||
| | #2 |
| Smurf Join Date: Jun 2007
Posts: 28
![]() | well this is very strange and difficult to understand code. I know about a very simple method used in php. Its called MD6 / MD5 you can just encrypt the password using MD6(password) you just need to write one line.and you are done.so which will you prefeR?
__________________ MarbleHost.com - reliable web hosting service |
| |
| | #3 |
| Member Join Date: Jan 2007
Posts: 142
![]() | By the way, do you know any tools to unencript winRAR password? |
| |
| | #4 |
| Newcomer Join Date: Jul 2007
Posts: 1
![]() | http://www.kevlardisk.org does decrypt md5 passwords. |
| |
| | #5 |
| Senior Member | it looks good . thanks for it |
| |
| | #6 |
| Newcomer Join Date: Aug 2007 Location: www.zaiaku.com
Posts: 17
![]() | I needed the md5 password decoder thanks! |
| |
(Threads which have no activity for more than 30 days are automatically closed.) |
| Quick Reply | ||
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| encrypt and decrypt query string | hanusoftware | Programming | 0 | 06-07-2007 07:21 AM |
| Changing my password | williamvanasse219@hotmail | MSN | 4 | 03-29-2007 03:53 PM |
| Help removing Bios password | artmark | General Talk | 10 | 03-22-2007 12:42 AM |
| Query String | pakadtrader | JavaScript | 3 | 01-28-2007 10:11 AM |