私は、復号化パスワードに取り組んでいると私は、このエラーに引っかかっ:文字列の長さをゼロにすることはできません。パラメータ名:OLDVALUE
String cannot be of zero length. Parameter name: oldValue
は親切にこのエラーに役立つか、私に復号化のための別のプログラムを提案します。
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は暗号化されていません**。 **ハッシュ**のパスワードを入力する必要があります。 – SLaks
エラーのどの部分を理解していませんか?あなたのコードは意味をなさない。 – SLaks
@FreeLancerここに私の完全なコードです。私はこのコードをウェブサイトから使用します。 string decryptpwd = string。空の; UTF8Encoding encodepwd = new UTF8Encoding(); デコーダデコード= encodepwd.GetDecoder(); バイト[] todecode_byte = Convert.FromBase64String(encryptpwd.Replace( "+"、 "")); int charcount = Decode.GetCharCount(todecode_byte、0、todecode_byte.Length); char [] decode_char =新しいchar [charcount]; Decode.GetChars(todecode_byte、0、todecode_byte.Length、decode_char、0); decryptpwd =新しい文字列(decode_char); return decryptpwd; – Raheel