vb.net - AES decrypt error -
hi getting error: padding between characters invalid , cannot removed or padding invalid , cannot removed.
the code is:
public shared function decrypt(byval text string) string dim inputbytes byte() = convert.frombase64string(text) dim resultbytes byte() = new byte(inputbytes.length + 1) {} dim decryptedtext string = [string].empty dim cripto new rijndaelmanaged() using ms new memorystream(inputbytes) using objcryptostream new cryptostream(ms, cripto.createdecryptor(_key, _iv), cryptostreammode.read) using sr new streamreader(objcryptostream, true) decryptedtext= sr.readtoend() end using end using end using return decryptedtext end function
please me
Comments
Post a Comment