 |
|
 |
I'm using your code to encrypt a query string. An encrypted query string contained an "=" sign which caused the decryption to fail. Is there a way to limit the character set to say just alphanumeric with no punctuation symbols?
|
|
|
|
 |
|
 |
I'm also using your code to encrypt and decrypt. Is there any ways that we can replace the special characters with alphanumeric in encryption? Thanks
|
|
|
|
 |
|
 |
I have use my code for encryption because lakhs of passwords has been encrypted through that how to implement your code for decrypting
i am using following for encrypting when i use decrypting of yours it says bad data
public string HashPassword(string password)
{
string hashedPassword = null;
SHA256Managed hashProvider = default(SHA256Managed);
try
{
byte[] passwordBytes = null;
byte[] hashBytes = null;
passwordBytes = System.Text.Encoding.Unicode.GetBytes(password);
hashProvider = new SHA256Managed();
hashProvider.Initialize();
passwordBytes = hashProvider.ComputeHash(passwordBytes);
hashedPassword = Convert.ToBase64String(passwordBytes);
}
finally
{
if ((hashProvider != null))
{
hashProvider.Clear();
hashProvider = null;
}
}
return hashedPassword;
}
|
|
|
|
 |
|
 |
HEllO to ALL,
please help me about encrypt and decrypt.I have my source code of Ecrypting algorithm,
can you please give me a code to decrypt.
here the source code below. ^ ^
using System.Text;
using System.Security.Cryptography;
namespace CustomerCardSystemBackroom
{
class MD5
{
public string createMD5(string strChange)
{
byte[] pass = Encoding.UTF8.GetBytes(strChange);
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
string strPassword = Encoding.UTF8.GetString(md5.ComputeHash(pass));
return strPassword;
}
// Create an md5 sum string of this string
public string GetMd5Sum(string str)
{
// First we need to convert the string into bytes, which
// means using a text encoder.
Encoder enc = System.Text.Encoding.Unicode.GetEncoder();
// Create a buffer large enough to hold the string
byte[] unicodeText = new byte[str.Length * 2];
enc.GetBytes(str.ToCharArray(), 0, str.Length, unicodeText, 0, true);
// Now that we have a byte array we can ask the CSP to hash it
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
byte[] result = md5.ComputeHash(unicodeText);
// Build the final string by converting each byte
// into hex and appending it to a StringBuilder
StringBuilder sb = new StringBuilder();
for (int i = 0; i < result.Length; i++)
{
sb.Append(result[i].ToString("X2"));
}
// And return it
return sb.ToString();
}
}
}
|
|
|
|
 |
|
 |
Hello
the function getMD5Sum is the fuction
thanks
|
|
|
|
 |
|
 |
i have an encrypted code and i have no idea how to get this to work.
|
|
|
|
 |
|
 |
Hi Barbiez,
You can decrypt only those text which you encrypted using the same application. If you are encrypted using a particular key, you need to use that key while decrypting.
Please download the code and see how it is implemented.
Regards,
Lovely Manuel.
Lovely Manuel
Santhisoft Technologies
|
|
|
|
 |
|
 |
Hi Lovely Manuel,
Thanks for the nice article.
Regards,
Mushtaque Nizamani
|
|
|
|
 |
|
 |
Welcome Mushtaque Nizamani...
Lovely Manuel
Santhisoft Technologies
|
|
|
|
 |
|
|
 |
|
 |
hi, you need to cut or copy the decrypted text and paste it into the Input Text textbox. Then click the Decrypt button. Hope that it will help you.
Lovely Manuel
Santhisoft Technologies
|
|
|
|
 |
|
 |
I keep getting this error(String reference not set to an instance of String), when I try to decrypt the password(encrypted with MD5)in the database.
A Koom
|
|
|
|
 |
|
 |
You need to encrypt your password using the encryption algorithm given in this article to decrypt it with the same. Also the key used to encrypt should be same while decypting it. I think you tried to decrypt your password which is encrypted by some other key.
Lovely Manuel
Santhisoft Technologies
|
|
|
|
 |
|
 |
Thanks. Now it is giving me this error(Bad Data).I'm using the default key.
A Koom
|
|
|
|
 |
|
 |
Please Try again as I think you are pressing wrong buttons at wrong time.
While decrypting the encrypted text should enter/paste in the input text box and then press the Decrypt button.
Lovely Manuel
Santhisoft Technologies
|
|
|
|
 |
|
 |
Great article, you have one of the better lessons available for encryption newbs like myself...
Cheers.
|
|
|
|
 |
|
|
 |
|
 |
I downloaded the program and no matter what I type I recieve this error
"Wrong Input. Invalid length for a Base-64 char array."
|
|
|
|
 |
|
 |
Please Try again as I think you are pressing wrong buttons at wrong time
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
 |
|
 |
How can I decrypt an encrypted string using MD5 algorithm
|
|
|
|
 |
|
 |
5 from me. Maybe a little bit more comments though.
Rajib Ahmed
|
|
|
|
 |
|
|
 |