pracuję nad Deszyfruj Hasło i naklejane na ten błąd:Łańcuch nie może mieć zerowej długości. Nazwa parametru: oldValue
String cannot be of zero length. Parameter name: oldValue
życzliwej pomocy na ten błąd lub zaproponować mi inny program do deszyfrowania.
Oto pełny kod:
string decryptpwd = string.Empty;
UTF8Encoding encodepwd = new UTF8Encoding();
Decoder Decode = encodepwd.GetDecoder();
byte[] todecode_byte = Convert.FromBase64String(encryptpwd.Replace("+",""));
int charcount = Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
char[] decode_char = new char[charcount];
Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decode_char, 0);
decryptpwd = new String(decode_char);
return decryptpwd;
** Base64 nie jest szyfrowane **. Musisz ** hash ** hasła. – SLaks
Jakiej części błędu nie rozumiesz? Twój kod nie ma sensu. – SLaks
@FreeLancer tutaj jest mój kompletny kod i używam tego kodu ze strony internetowej string decryptpwd = string.Pusty; UTF8Encoding encodepwd = new UTF8Encoding(); Decoder Decode = encodepwd.GetDecoder(); bajt [] todecode_byte = Convert.FromBase64String (encryptpwd.Replace ("+", "")); int charcount = Decode.GetCharCount (todecode_byte, 0, todecode_byte.Length); char [] decode_char = new char [charcount]; Decode.GetChars (todecode_byte, 0, todecode_byte.Length, decode_char, 0); decryptpwd = new String (decode_char); return decryptpwd; – Raheel