C# Beginners Tutorial - 117 - TripleDES Decryption

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

@Bob Marley   You can put a try and catch around the decryption part and if it catches, throw an exception saying something like "Invalid key name."

alicenirvana
Автор

Why it doesn't work with SHA1 it throws an error saying the size isn't ok with the algorithm or something similar i don't remember exactly :/ what should i add in my code to make it work?

alditopalli
Автор

im having problems decrypting as the encrypted text is coming back from a telegram bot api as e.message.text in the format
of a hex string like
B9-CA-06-F1-5E-B9-5E-D7
i tired to store this value in a byte array but it crashes on decryption saying length of byte array is invalid so i printed out the byte array and its

Realmulation
Автор

I have an issue. I get a Cryptographic Exception, "Data to decrypt has an Invalid Length. ", If I manually pass "data to be decrypted" of size 8, 16, 24...(multiples of 8), I don't get this exception and I get some strange output. How do I solve this problem?

RaviNaik
Автор

and whats the smart way to display a message saying the wrong key was entered to decrypt as opposed to crashing the program?

I know i could simply do:
!= 0) ...

but is there a more technical way to do this?

BobMarley-rrgk
Автор

I have an issue i keep getting an invalid length exception... help anyone??

StarboyProductions
Автор

store the encrypted byte array in the Settings of the Application

pottersun
Автор

how do i decrypt the bytes from a text?


txtDecrypted.Text = utf8.GetString(trans.TransformFinalBlock(txtEncrypted.Text, 0, txtEncrypted.Text.Length));

inurdreamsfuzzy
Автор

try and catch? catch the error and display message

gorbazor
Автор

Bob Marley you surround your code with a try-catch statement, and then you put a fancy sentence in the mbox, that says that the password is uncorrect

charlesparoissien